Option Explicit
Sub Test
Dim Ctl As Object
Dlg=CreateUnoDialog(DialogLibraries.Standard.MyDialog)
Ctl=Dlg.getControl("CommandButton1")
Xray Ctl
End Sub
As far as I can see, using Xray, there is a setLabel method, but there
is no getLabel method. The Label variable seems to be write only. This
is really terrible (for me), if there is no workaround, because I
really need to read the label (hopefully without creating a global
variable that also contains the label…).
Of course most people want to know what I am trying to do…
Well, I have a command button and I want it to display different text
depending on the situation. That's easy since I can easily set the
label with the setLabel method. However, when a certain text is
displayed on the button, some things need to be done differently when
clicking the button, so I need to know the ”state” of the button. Is
it a ”Do this” button or is it currently a ”Do the other thing”
button? I really need to know that, or at least my subroutine does.
Of course I could have two different buttons, but I thought this would
be cool, and that's reason enough for me to try to achieve this…
Best regards
Johnny Rosenberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]