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: Klaus, FourthWorld, heatherlaine, 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 »

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: 4219
Joined: Sun Jan 07, 2007 9:12 pm

Re: setting a intial value in a combo box

Post by bn »

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 »

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 »

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