Sheet değişince Otomatik kapanan Modales Dialog1 ?
-
- Mesajlar: 18
- Kayıt: 20 Eyl 2014, 22:28
- İşletim Sisteminiz: Windows 8 , Windows 7
- LibreOffice Sürümü: 4.2.6.3
Sheet değişince Otomatik kapanan Modales Dialog1 ?
LibreOffice Calc de Modaless dialog kodsuz oluşturlamıyor sanırım, kod ile oluşturulan dialogu kapatan kod lazım, örneğin Sheet2 ye geçtiğimde Dialog1 otomatik kapansın istiyorum.
-
- Mesajlar: 18
- Kayıt: 20 Eyl 2014, 22:28
- İşletim Sisteminiz: Windows 8 , Windows 7
- LibreOffice Sürümü: 4.2.6.3
Re: Sheet değişince Otomatik kapanan Modales Dialog1 ?
Option Explicit
global Continue as boolean
Sub StartDialog()
Dim oDoc , buSheet , buAdres as Object
Dim oDlg As Object, oLib As Object, myDlg As Object
Dim A As Integer
dim oListenerTop as object
oDoc = ThisComponent
DialogLibraries.LoadLibrary("Standard")
oLib = DialogLibraries.GetByName("Standard")
myDlg = oLib.GetByName("Dialog1")
oDlg = CreateUnoDialog(myDlg)
oDlg.setPosSize(257,47,400,,3) 'X,Y,Genişliği,,Yüksekliği
Continue = true
oListenerTop=createUnoListener("TopListen_", "com.sun.star.awt.XTopWindowListener")
oDlg.addTopWindowlistener(oListenerTop)
do while Continue
oDlg.setVisible(true)
wait 20
buSheet = ThisComponent.getCurrentController().getActiveSheet()
buAdres = buSheet.getRangeAddress()
A = buAdres.Sheet
if A>3 then
Continue = false
end if
loop
End Sub
sub TopListen_WindowClosing
Continue=false
end sub
sub TopListen_windowOpened
end sub
sub TopListen_windowClosed
end sub
sub TopListen_windowMinimized
end sub
sub TopListen_windowNormalized
end sub
sub TopListen_windowActivated
end sub
sub TopListen_windowDeactivated
end sub
sub TopListen_disposing
end sub
global Continue as boolean
Sub StartDialog()
Dim oDoc , buSheet , buAdres as Object
Dim oDlg As Object, oLib As Object, myDlg As Object
Dim A As Integer
dim oListenerTop as object
oDoc = ThisComponent
DialogLibraries.LoadLibrary("Standard")
oLib = DialogLibraries.GetByName("Standard")
myDlg = oLib.GetByName("Dialog1")
oDlg = CreateUnoDialog(myDlg)
oDlg.setPosSize(257,47,400,,3) 'X,Y,Genişliği,,Yüksekliği
Continue = true
oListenerTop=createUnoListener("TopListen_", "com.sun.star.awt.XTopWindowListener")
oDlg.addTopWindowlistener(oListenerTop)
do while Continue
oDlg.setVisible(true)
wait 20
buSheet = ThisComponent.getCurrentController().getActiveSheet()
buAdres = buSheet.getRangeAddress()
A = buAdres.Sheet
if A>3 then
Continue = false
end if
loop
End Sub
sub TopListen_WindowClosing
Continue=false
end sub
sub TopListen_windowOpened
end sub
sub TopListen_windowClosed
end sub
sub TopListen_windowMinimized
end sub
sub TopListen_windowNormalized
end sub
sub TopListen_windowActivated
end sub
sub TopListen_windowDeactivated
end sub
sub TopListen_disposing
end sub