OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: johnM on September 23, 2009, 10:00:22 PM

Title: Grid control issue with column click
Post by: johnM on September 23, 2009, 10:00:22 PM
autocad 2004 : opendcl runtime arx 5.1.1.8
I have a grid and I have a modal box that will display at the mouse coordinates when a column header is clicked. I’m using the modal box as a menu to insert clm’s before/after the clicked column.
When I click the column grid header the modal box shows but the grid still has focus until you click anywhere again, on screen on the main form or the modal form. Then you can single click the buttons on the modal form or you have to click the buttons on the modal form twice.

Any suggestions
Title: Re: Grid control issue with column click
Post by: owenwengerd on September 24, 2009, 09:12:35 AM
This is now fixed for Alpha 6. To work around the problem in 5.1, try this:

(defun showmenu () (dcl_Form_Show MyProject_MyForm))

(defun c:MyProject_MyForm_MyGrid_OnColumnClick (Column /)
  (dcl_DelayedInvoke 0 "showmenu")
)
Title: Re: Grid control issue with column click
Post by: johnM on September 24, 2009, 10:53:39 AM
thanks that worked great
you just needed to make the showmenu defun with a C:showmenu otherwise you get an error "no function found"

thanks for the quick reply
Title: Re: Grid control issue with column click
Post by: mjacak on December 22, 2011, 01:31:45 AM
Hi Owen

This problem still ocurres with OpenDCL 7.0.0.2 for modal forms. When grid is in modal form and I show menu form (modal as well) column keep focus. In this case I can't use workaround with dcl_DelayedInvoke. 

Is any other solution ?

Mateusz
Title: Re: Grid control issue with column click
Post by: owenwengerd on December 22, 2011, 05:10:47 AM
I'll have a look. Did the problem exist in Alpha 1 or was it was introduced in Alpha 2?
Title: Re: Grid control issue with column click
Post by: mjacak on December 22, 2011, 06:11:48 AM
Hi Owen.

I noticed this problem for 6.0.2.5, 7.0.0.1 and 7.0.0.2, but could exist before as well.

Thanks
Mateusz
Title: Re: Grid control issue with column click
Post by: owenwengerd on January 26, 2012, 02:53:09 PM
This should now be fixed in the next alpha build.
Title: Re: Grid control issue with column click
Post by: mjacak on February 27, 2012, 11:48:25 PM
Hi Owen.

The problem still ocurres with OpenDCL 7.0.0.3. I hope you can find solution  :).

Mateusz
Title: Re: Grid control issue with column click
Post by: owenwengerd on February 28, 2012, 08:30:12 AM
Please try to create a very simple .odcl and .lsp that demonstrates the problem so I can be sure what you are experiencing.
Title: Re: Grid control issue with column click
Post by: mjacak on February 29, 2012, 04:36:49 AM
Hi Owen.

I attached an example and short video to show the problem.

Thanks
Mateusz
Title: Re: Grid control issue with column click
Post by: owenwengerd on February 29, 2012, 10:41:01 AM
I've added a bit more code to address the problem, so hopefully the next build will resolve this for you. There is still some potential for problems due to the fact that the column button never gets the "mouse up" event that it is waiting for, but at least the secondary dialog works as expected.
Title: Re: Grid control issue with column click
Post by: mjacak on February 29, 2012, 11:59:02 PM
The point is to act on second form without additional click. I'm waiting for next build to test it.

Thanks a lot Owen.

Mateusz
Title: Re: Grid control issue with column click
Post by: owenwengerd on March 02, 2012, 05:37:38 PM
I had to upload new MSI files to correct a problem with inclusion of system DLLs, so I snuck in this fix as well. The version didn't change, so you must uninstall the original 7.0.0.3 before installing the new one.
Title: Re: Grid control issue with column click
Post by: mjacak on March 03, 2012, 12:02:50 AM
Problem solved. :-). Works as expected.

Thanks again.
Mateusz