Datagrid question

Peter Haworth pete at mollysrevenge.com
Thu Feb 3 14:12:28 EST 2011


Thanks Trevor.  I just did that very thing as a workaround until I heard back so the workaround now becomes the solution!

Pete Haworth

-------------- next part --------------






http://www.mollysrevenge.com
http://www.sonicbids.com/MollysRevenge
http://www.myspace.com/mollysrevengeband








On Feb 3, 2011, at 10:47 AM, Trevor DeVore wrote:

> On Thu, Feb 3, 2011 at 12:50 PM, Peter Haworth <pete at mollysrevenge.com>wrote:
> 
>> Here's an outline of what I'm trying to do.  I've used a custom version of
>> the default header behavior to display a popup menu when the user clicks on
>> a datagrid header.  That all works fine. When The user selects a menu item
>> from the popup, I have a menuPick handler in the script of the popup menu
>> that processes the choice and that's where I need to get access the
>> properties I mentioned.
>> 
> 
> What I do in these situations is store the object reference as a custom
> property of the popup button before I display it.
> 
> on mouseDown
>    ...
>    set the uHeaderControl of button "Popup" to the dgHeaderControl of the
> target
>    popup button "Popup"
> end mouseDown
> 
> Then in the menuPick handler you have access to the object.
> 
> on menuPick pChosen
>    switch pChosen
>        case "something"
>            put the uHeaderControl of me into theHeaderControl
>            ....
>    ....
> end menuPick
> 
> Regards,
> 
> 
> -- 
> 
> Trevor DeVore
> 
> Blue Mango Learning Systems
> 
> www.bluemangolearning.com    -    www.screensteps.com
> _______________________________________________
> 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