Manually setting values of a combo box

Questions and answers for designing and implementing forms in Servoy

Manually setting values of a combo box

Postby kschuster » Sun Apr 08, 2012 5:46 am

I want a combo box to show the values 1-10. I could make a value list for it. Is that the only way to do this? Can't I just set the values for the combo box directly?

Thanks
KS
kschuster
 
Posts: 53
Joined: Fri Mar 28, 2008 4:42 am
Location: Houston, TX

Re: Manually setting values of a combo box

Postby ROCLASI » Sun Apr 08, 2012 11:03 am

Hi KS,

You can't add values directly to the combobox control itself. Servoy uses the valuelist object to control what is shown in the combobox.
And as you might know there are several ways to fill this valuelist, at design time (hardcoded values), via code or data-driven (from a table).

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Manually setting values of a combo box

Postby kschuster » Sun Apr 08, 2012 5:18 pm

What I'm trying to figure out is how to hardcore them
kschuster
 
Posts: 53
Joined: Fri Mar 28, 2008 4:42 am
Location: Houston, TX

Re: Manually setting values of a combo box

Postby ROCLASI » Mon Apr 09, 2012 6:58 pm

Hi KS,

Like I said you would need a Valuelist object for this. There you can hardcode any values that can be used with your combobox.
So to be clear, you CAN'T hardcode any values directly into the Servoy combobox control. You do this in the linked Valuelist object so if you don't have a valuelist for this yet you should create one.

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Manually setting values of a combo box

Postby kschuster » Thu Apr 12, 2012 8:31 pm

got it! Thanks
kschuster
 
Posts: 53
Joined: Fri Mar 28, 2008 4:42 am
Location: Houston, TX


Return to Forms

Who is online

Users browsing this forum: No registered users and 18 guests