Set the items of Option menu
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Set the items of Option menu
Hello!
my question is: how to set up the items of Option menu in LiveCode?
In Card's script:
i have a "Repeat" structure to scan the database. with X from 1 to 40 i'm reading from database the field "Name" with number X and if "Name" is not empty, i adding the current number X (with "return" charachter) AFTER variable which i call "RiderSet". Why am i doin it? For option menu i don't need whole numbers (1-40) to choose which select, i need just numbers of existing riders.
And now i need to assign this set to items i can choose with Option Menu
i've tried like this:
set menuItems of button "RiderA1Number" to RiderSet
or like this:
put RiderSet into menuItems of button "RiderA1Button"
but it's failed. Write for me right syntax, please!
my question is: how to set up the items of Option menu in LiveCode?
In Card's script:
i have a "Repeat" structure to scan the database. with X from 1 to 40 i'm reading from database the field "Name" with number X and if "Name" is not empty, i adding the current number X (with "return" charachter) AFTER variable which i call "RiderSet". Why am i doin it? For option menu i don't need whole numbers (1-40) to choose which select, i need just numbers of existing riders.
And now i need to assign this set to items i can choose with Option Menu
i've tried like this:
set menuItems of button "RiderA1Number" to RiderSet
or like this:
put RiderSet into menuItems of button "RiderA1Button"
but it's failed. Write for me right syntax, please!
Re: Set the items of Option menu
Hi UltraVibe,
Try this:
Best regards
Jean-Marc
Try this:
Code: Select all
set the text of btn "RiderA1Number" to RiderSet
Jean-Marc
https://alternatic.ch
Re: Set the items of Option menu
i try like this:jmburnod wrote:Hi UltraVibe,
Try this:Best regardsCode: Select all
set the text of btn "RiderA1Number" to RiderSet
Jean-Marc
Code: Select all
put RiderSet into button "RiderA1Number"
Re: Set the items of Option menu
One more question, guys!
I got rounded rectangle filled with some color under the group of buttons, checkboxes and something else...
I use it to separate visually several buttons and text fields from each other (it's like visual grouping). How can i change (by program code) the backgroundcolor of these rounded rectangles?
Please write the syntax for me)))))
I got rounded rectangle filled with some color under the group of buttons, checkboxes and something else...
I use it to separate visually several buttons and text fields from each other (it's like visual grouping). How can i change (by program code) the backgroundcolor of these rounded rectangles?
Please write the syntax for me)))))
Re: Set the items of Option menu
Hi,
doesn't work ?
Code: Select all
set the backgroundcolor of grc "mygrc" to tColor
https://alternatic.ch
Re: Set the items of Option menu
jmburnod, i found full syntax of this word:
set backcolor of graphic "Name" to red (for example))))))
and by the way, how can i define color in that construction by hex parameters: for example #408080?
tell me, please))))
P.S. I need it in case if i don't know the exact word for needed color)))))
set backcolor of graphic "Name" to red (for example))))))
and by the way, how can i define color in that construction by hex parameters: for example #408080?
tell me, please))))
P.S. I need it in case if i don't know the exact word for needed color)))))
Re: Set the items of Option menu
Hi Ultravibe,
just enter the hex color
Kind regards
Bernd
just enter the hex color
Code: Select all
set the backgroundColor of graphic "myGraphic" to "#408080"
Bernd
Re: Set the items of Option menu
bn, thank you!
i've already find this solution, but at first time i was trying to use just #408080 without " " and it doesn't works.
Adding the " " is correct the problem.
Thank you anyway ))))))))
i've already find this solution, but at first time i was trying to use just #408080 without " " and it doesn't works.
Adding the " " is correct the problem.
Thank you anyway ))))))))