menuHistory & menuPick

jbv jbv at souslelogo.com
Sat Aug 5 08:15:15 EDT 2017


well, not exactly...
here's the thing : I have a hidden option button with several choices :
  choice1
  choice2
  choice2

At some point the content of the btn gets updated and it becomes visible
with the following script :
  put "choice4" & return & "choice5" & return & "choice6" into btn 1
  set label of btn 1 to line 2 of btn 1
  set menuhistory of btn 1 to 2

The purpose of the "menuhistory" line is, when user press the btn,
to have all the choices "centered around" the visible one on the label,
which is more elegant imho...

jbv


On Sat, August 5, 2017 1:10 pm, Klaus major-k via use-livecode wrote:
>

>> Am 04.08.2017 um 23:27 schrieb Bob Sneidar via use-livecode
>> <use-livecode at lists.runrev.com>:
>>
>>
>> Hi JB.
>>
>>
>> To set the menu display value without triggering menuPick, set the
>> label of the menu button. In order to trigger the menuPick handler when
>> changing the value, use menuHistory. No need to suspend messages or
>> anything fancy like that.
>>
>> Bob S
>>
>
> and the winner is: Mr. Bob S.! :-)
>
>>> On Aug 4, 2017, at 11:04 , jbv via use-livecode
>>> <use-livecode at lists.runrev.com> wrote:
>>>
>>>
>>> Hi
>>> According to the doc, when you set the menuHistory property, a
>>> menuPick message is sent to the button. I managed to block the menupick
>>> message with a boolean variable, but is there an easier/more elegant
>>> way to momentary block that message when setting menuhistory ?
>>>
>>> Thanks in advance.
>>> jbv
>
> Best
>
>
> Klaus
>
>
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list use-livecode at lists.runrev.com Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>






More information about the use-livecode mailing list