Popup button and DataGrid

Paul Looney support at ahsomme.com
Fri Jan 21 16:56:39 EST 2011


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,




More information about the use-livecode mailing list