OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

how to get contols of form component in open office

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
AYAZ
General User
General User


Joined: 31 Oct 2007
Posts: 5
Location: mumbai India

PostPosted: Sat Nov 17, 2007 4:16 am    Post subject: how to get contols of form component in open office Reply with quote

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
View user's profile Send private message Yahoo Messenger
QuazzieEvil
Super User
Super User


Joined: 17 Jan 2007
Posts: 599
Location: Houston, TX

PostPosted: Sat Nov 17, 2007 11:49 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group