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

Combo Box list index

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


Joined: 27 Jan 2011
Posts: 14
Location: UNITED KINGDOM

PostPosted: Tue Mar 15, 2011 12:38 pm    Post subject: Combo Box list index Reply with quote

Hi All,

Try as I might I have been unable to find the combo box property that contains the index number of the selected Item. I have searched the forums etc. and tried x-ray but nothing seems to show up there.

The Combo Box is populated from a series of cells in Calc. and I need to know from which cell the selected item originated and the index of the selection would give me this. The contents of the cells may change so I can't use the "ComboBox1.Value" or ".Text " Properties.
The following Code
Code:
Dim Doc as Object, Form as Object, mySelection as Integer
Doc = ThisComponent
Form = Doc.getDrawPages.getByIndex(0).getForms.getByIndex(0)
mySelection = Form.getByName("ComboBox1").getSelectedItemPos


does not work. Can anyone help please.

Dave.
Back to top
View user's profile Send private message AIM Address
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Mar 16, 2011 3:37 am    Post subject: Reply with quote

A combo box is not the same as in MS Access. In OOo it is nothing more than an enhanced text box with suggestions offered by means of auto-complete. The list provides an additional way to make suggestions. You can type anything into the control. It is not limited to the suggestions. Using combos in Calc makes not sense. Instead you can use validations or auto-complete more efficiently.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Womble
General User
General User


Joined: 27 Jan 2011
Posts: 14
Location: UNITED KINGDOM

PostPosted: Wed Mar 16, 2011 10:48 am    Post subject: Reply with quote

Thank you. I will have to find an alternative solution.

Dave.
Back to top
View user's profile Send private message AIM Address
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