Page 1 of 1

Combobox to First State

Posted: Sun Dec 08, 2013 6:33 pm
by ARAS
Hello,

I have three comboboxes(option type buttons). They are called cDay, cMonth, cYear.

They are basically for Day, Month and Year. I want to reset those comboboxes after I click a button.

Let's say I chose 5 June 1945 and I clicked a button called "Submit".

I want to the comboboxes to return their original state - 1 January 1940 or Day Month Year.

It will show the first value in the content or Day Month Year. In a nutshell, I am trying to clear the combobox for the next submission.

I would appreciate if sb could help me.

Regards,
ARAS

Re: Combobox to First State

Posted: Sun Dec 08, 2013 6:48 pm
by Klaus
Hi Aras,

LABEL is what you want to set:
---
set the label of btn "your btn here..." to line 1 of the text of btn "your btn here..."
...


Best

Klaus

Re: Combobox to First State

Posted: Sun Dec 08, 2013 6:58 pm
by ARAS
Hi Klaus,

It works.

Thank you,
ARAS

Re: Combobox to First State

Posted: Sun Dec 08, 2013 7:19 pm
by dunbarx
What Klaus said.

I always see it better when I set or read the menuHistory:

set the menuHistory of btn "yourCombo" to 1

Makes me pay attention to the actual line number shown. Also, you do not need to know what the text in line 1 actually is:

repeat with y = 1 to the number of btnsThatAreCombos
set the menuHistory of btn y to 1
end repeat

Craig Newman

Re: Combobox to First State

Posted: Sun Dec 08, 2013 7:25 pm
by Klaus
Hi Craig,

yes, but just setting the label does not fire a "menupick" message like setting the menuhistory does! 8)


Best

Klaus