How to access the text of an option btn before menuPick?
    Phil Davis 
    revdev at pdslabs.net
       
    Fri Oct  9 16:58:52 EDT 2015
    
    
  
Hi Tiemo,
On a Mac, the option button list is shown at the full width of the text 
it contains.
I haven't tried it on other platforms. If it doesn't work that way on 
your platform, you could do something like this (in the button script):
local sOriginalRect
on menuPick pItemName
     restoreMe
     answer pItemName
end menuPick
on mouseDown
     if sOriginalRect is empty then put the rect of me into sOriginalRect
     put sOriginalRect into tRect
     put (item 1 of tRect + the formattedWidth of me) into item 3 of tRect
     set the rect of me to tRect
end mouseDown
on mouseLeave
     restoreMe
end mouseLeave
command restoreMe
     lock screen
     set the rect of me to sOriginalRect
     unlock screen
end restoreMe
Hope this helps -
Phil Davis
On 10/9/15 5:48 AM, Tiemo Hollmann TB wrote:
> Hello,
>
> I have an option button with long text lines as options, but the button
> itself is smaller (width) as the text lines (because of layout
> restrictions), so that you can't read the full text of the options.
>
> Now I would like to find any solution to show the user the full content of
> the text lines before he clicks any choice. Either by hovering or right
> click or anything else I would like to put the line into the tooltip or
> anything else. By now I failed to grab the hilitedLine of the option menu.
>
> Any idea how to access the text by hovering or right click?
>
> Thanks
>
> Tiemo
>
>   
>
>   
>
>   
>
>   
>
> _______________________________________________
> 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
>
-- 
Phil Davis
    
    
More information about the use-livecode
mailing list