setting a intial value in a combo box

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Hapache
Posts: 4
Joined: Thu Feb 24, 2011 12:42 pm

setting a intial value in a combo box

Post by Hapache » Tue Mar 01, 2011 2:36 pm

Hello,
I have a button type combobox with a list of value in menu items (00, 01, 02, 03,..).
And, I would like to script that during preOpenCard, the selected value of the combo is 02.
I tried many ways, but didn't find one working and didn't find something helping me in the documentation.
Does someone have any idea?

Thanks


Hapache

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4174
Joined: Sun Jan 07, 2007 9:12 pm

Re: setting a intial value in a combo box

Post by bn » Tue Mar 01, 2011 2:59 pm

Hi Hapache,

look at menuhistory.

Code: Select all

set the menuhistory of btn "myComboBox" to 2
regards

Bernd

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: setting a intial value in a combo box

Post by Janschenkel » Thu Mar 03, 2011 2:17 pm

Or you can set the label property of the combobox button to the desired text.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Hapache
Posts: 4
Joined: Thu Feb 24, 2011 12:42 pm

Re: setting a intial value in a combo box

Post by Hapache » Tue Mar 15, 2011 10:14 am

bn wrote:Hi Hapache,

look at menuhistory.

Code: Select all

set the menuhistory of btn "myComboBox" to 2
regards

Bernd
This is working perfectly
Thanks

Post Reply