OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: roy_043 on November 16, 2016, 07:16:06 AM

Title: Button click on modeless form higlights geometry (BricsCAD)
Post by: roy_043 on November 16, 2016, 07:16:06 AM
While testing my first modeless form, I notice that clicking on a button will highlight geometry under the dialog. This occurs in BricsCAD V16 and V17 (I have not tried other versions). In BricsCAD V16 the Quad will even display. Is this a known issue?

Project:
See here: http://www.opendcl.com/forum/index.php?topic=2446.msg12212#msg12212

Program versions:
OpenDCL.Studio.ENU.8.1.1.1
BricsCAD-V17.1.04-2-en_US(x64)
Title: Re: Button click on modeless form higlights geometry (BricsCAD)
Post by: owenwengerd on November 19, 2016, 09:06:46 PM
It looks like the event handler causes focus to revert to the drawing window, so that the button-up event gets sent there instead of the modeless form. I'll investigate.

P.S. A form with only buttons should almost always have KeepFocus=False. It doesn't have any effect on the bug, just a usability issue.
Title: Re: Button click on modeless form higlights geometry (BricsCAD)
Post by: roy_043 on November 20, 2016, 01:23:41 AM
Thank you Owen.
Your tip makes sense. I'll change the KeepFocus property in the sample project.
Title: Re: Button click on modeless form higlights geometry (BricsCAD)
Post by: owenwengerd on November 20, 2016, 07:44:34 AM
This turns out to be a BricsCAD bug. I've submitted a bug report. From what I can tell it doesn't cause any major problems, just a bit disconcerting.
Title: Re: Button click on modeless form higlights geometry (BricsCAD)
Post by: roy_043 on November 28, 2016, 12:31:26 PM
Thanks.
I have meanwhile changed the KeepFocus property of the form to False. But there seems to be no effect. If I hover over the dialog after pressing a button and enter a letter (let's say "L") it is not sent to the BricsCAD Command Line as I would have expected. Perhaps this is related to the aforementioned bug?
Title: Re: Button click on modeless form higlights geometry (BricsCAD)
Post by: owenwengerd on November 28, 2016, 05:09:08 PM
KeepFocus doesn't come into play until the mouse moves back over the drawing window. At that time, the drawing window steals focus back unless KeepFocus=true.
Title: Re: Button click on modeless form higlights geometry (BricsCAD)
Post by: roy_043 on November 29, 2016, 01:24:03 AM
Thank you for your explanation. In BricsCAD the drawing window also 'steals the focus' if KeepFocus is True. I assume that this is because the bug switches the focus.