WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jmburton2001 on May 26, 2019, 10:54:02 AM

Title: Remove border on CheckBox?
Post by: jmburton2001 on May 26, 2019, 10:54:02 AM
Is there any way to remove (or prevent) this border when a CheckBox is selected?

(https://i.imgur.com/xKsjHNk.png)
Title: Re: Remove border on CheckBox?
Post by: td on May 28, 2019, 07:02:26 AM
That would depend on how the checkbox is implemented.  Different Windows UI development environments create UI widgets using completely different technologies.
Title: Re: Remove border on CheckBox?
Post by: jmburton2001 on May 28, 2019, 12:12:10 PM
It's implemented in Winbatch Studio as a Winbatch dialog element.

Code (winbatch) Select
MyDialog040=`169,231,142,009,CHECKBOX,"CheckBox_1",cbVariable1,"Include System Information in report",1,400,DEFAULT,"Microsoft Sans Serif|6554|140|34",DEFAULT,DEFAULT`

It's derived from the WIL Dialog Editor as shown below.

(https://i.imgur.com/Q21Frv1.png)
Title: Re: Remove border on CheckBox?
Post by: td on May 28, 2019, 01:54:55 PM
An image of the WIL Dialog Editor's "Attribute" dialog wasn't necessary.  The rectangle you seem so concerned about is the "Focus" rectangle that is part of the operations systems implementation of dialog boxes.  It is drawn by the system's common controls to provide a visual clue to the widget that is receiving user input when a keyboard key is pressed.  The only way to prevent it would be to remove the focus from the control or to subclass the control so you could draw it however you chose.  The former is more doable but would likely have visual side-effects and the latter requires a good deal of time, knowledge, and skill.