1. sayfa (Toplam 1 sayfa)
Sheet değişince Otomatik kapanan Modales Dialog1 ?
Gönderilme zamanı: 05 Ağu 2017, 13:05
gönderen qqaazz
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.
Re: Sheet değişince Otomatik kapanan Modales Dialog1 ?
Gönderilme zamanı: 23 Ağu 2017, 22:58
gönderen qqaazz
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