Popup button and DataGrid

Peter Haworth pete at mollysrevenge.com
Fri Jan 21 16:02:43 CST 2011


dgMouseDown is a handler provided with the datagrid library, not one you write.  Take a look at the following lesson - it explains it much better than I can!

http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7316-How-Do-I-Add-a-mouseDown-Event-To-The-Data-Grid-Without-Breaking-It-

Pete Haworth

On Jan 21, 2011, at 1:56 PM, Paul Looney wrote:

> Peter,
> That makes sense but what is the syntax?
> I tried putting:
> 
> on dgMouseDown
>     -- various things
> end dgMouseDown
> 
> but that handler never got called.
> I tried:
> 
> on mouseDown
>     send "dgMouseDown" to grp "Pending Orders Data Grid"
>     popup btn "Selected Orders Popup"
> end mouseDown
> 
> which seemed to have no effect.
> Seem to be really close now.
> Paul Looney
> 
> 
> On Jan 21, 2011, at 1:23 PM, Peter Haworth wrote:
> 
>> You have to call the datagrid dgMouseDown handler in your mousedown handler.  Assuming your mouseDown handler is in the datagrid script, just call dgMousedown with the button number before you display your popup.  Otherwise, the datagrid doesn;t see the mousedown event until after your mousedown handler sees it.  No need to pass mouseDown either.
>> 
>> Pete Haworth
> 
>>>>> On Fri, Jan 21, 2011 at 9:05 PM, Paul Looney <support at ahsomme.com> wrote:
>>>>>> Help please.
>>>>>> I am trying to use a popup button with a datagrid.
>>>>>> 
>>>>>> I have code, in the dg, that looks like this:
>>>>>> 
>>>>>> on mouseDown
>>>>>>   popup btn "Selected Orders Popup"
>>>>>> end mouseDown
>>>>>> 
>>>>>> The popup works fine but the selected line in the dg is not hilited until
>>>>>> after something is selected in the popup. So, to the user, it looks like the
>>>>>> popup refers to the previously selected line.
>>>>>> I will probably solve it but figured someone on the list already has the
>>>>>> solution.
>>>>>> 
>>>>>> Thanks in advance.
>>>>> 
>>>>> Paul,
> 
> _______________________________________________
> 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