Combo Box - no2 dropdown list problem 
Author Message
 Combo Box - no2 dropdown list problem

Hi
Pretty easy question I think I want to call a combobox
cboCertificate and have catagories U, PG, 12, 15 & 18 as options
but it sets the text property the same as the name and gives a text is
read only message when I try to change the property to blank
Could someone help
Thanks
Andrew




Mon, 24 Dec 2001 03:00:00 GMT  
 Combo Box - no2 dropdown list problem

Quote:

> Hi
> Pretty easy question I think I want to call a combobox
> cboCertificate and have catagories U, PG, 12, 15 & 18 as options
> but it sets the text property the same as the name and gives a text is
> read only message when I try to change the property to blank
> Could someone help
> Thanks
> Andrew



Sorry All - worked out it doesn't appear at runtime
:-)


Mon, 24 Dec 2001 03:00:00 GMT  
 Combo Box - no2 dropdown list problem
If the ComboBox style is set to DropDownList type, then you can either add
the items at design time using the "List" property, or at run-time using
the cboCertificate.Additem method.  To set the DropDownList to a "BLank"
set the cboCertificate.ListIndex = -1.

Setting a DropDownList type combo using a code statement like
cboCertificate.Text = ""
will most likely cause an error, which if not trapped could cause your
runtime to crash.

You can set the DropDownList box by setting the text property = "PG", or
any of your already added items, as long as the word has already been
added to the list.
If you are using a ComboBox then you can set the Text property without
using "AddItem" first however it does not actually get put into the list
until it is added.

Quote:

> Hi
> Pretty easy question I think I want to call a combobox
> cboCertificate and have catagories U, PG, 12, 15 & 18 as options
> but it sets the text property the same as the name and gives a text is
> read only message when I try to change the property to blank
> Could someone help
> Thanks
> Andrew





Mon, 24 Dec 2001 03:00:00 GMT  
 Combo Box - no2 dropdown list problem

Andrew,

Check out the Style Property - if it's set to "2 - Dropdown List", then
you can only select from values already in the list (by setting the
ListIndex property); you can't assign values directly to the Text
property.  Having said that, you can 'blank' out the ComboBox temporarily
by setting the ListIndex to -1.

Regards,
    Phill  W.

Quote:

> Hi
> Pretty easy question I think I want to call a combobox
> cboCertificate and have catagories U, PG, 12, 15 & 18 as options
> but it sets the text property the same as the name and gives a text is
> read only message when I try to change the property to blank
> Could someone help
> Thanks
> Andrew





Mon, 24 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

2. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

3. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

4. Default value for dropdown combo list box?

5. Combo Box dropdown list

6. Combo Box / Dropdown list

7. Combo Box Dropdown List Width

8. COMBO BOX, STYLE : DROPDOWN LIST

9. Locked Combo Box BUG (Dropdown List Style)

10. 97, Combo box, Dropdown problem.

11. Dropdown Combo box problem

12. dropdown combo box problem

 

 
Powered by phpBB® Forum Software