| View previous topic :: View next topic |
| Author |
Message |
AYAZ General User

Joined: 31 Oct 2007 Posts: 5 Location: mumbai India
|
Posted: Sat Nov 17, 2007 4:16 am Post subject: how to get contols of form component in open office |
|
|
for dialog box we use following code to get the control of the text field which can be used for various perposes
[/code]
sub show_dialog
DialogLibraries.LoadLibrary("Standard")
odialog = CreateUnoDialog(DialogLibraries.Standard.Dialog)
odialog.setTitle("password dialog")
odialog.Execute()
itext = odialog.getControl("TextField")
f = itext.gettext()
p = f
print p
end sub
but if we want to get the control of combox,(or any other form component )which we have created directly(and not through macro), then how to get its control so tat we can use its text in some other place.
pls help as want to create multidependency combo box ,
Thanx... in advance |
|
| Back to top |
|
 |
QuazzieEvil Super User

Joined: 17 Jan 2007 Posts: 599 Location: Houston, TX
|
Posted: Sat Nov 17, 2007 11:49 am Post subject: |
|
|
to get the control 'model' use form.getByName("CONTROL_NAME")
to get the control 'view' you need to get it from the form document controller--pass the contol model
-->FormDocument.CurrentController.getControl(ControlModel) |
|
| Back to top |
|
 |
|