checkboxes

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

checkboxes

#1 Post by reganc »

I've always wondered why checkboxes are so difficult to deal with and I presume this isn't an Express++ problem as such.

Ok, I get that they are based on the in-built windows controls. But you seem to get a tickbox that sits on top of a small static object whose size is not related to the size of the actual tickbox itself.

The reason I mention this is that just recently I was asked to add a tickbox to one of our dialogs. But as we use the DCGETOPTIONS...COLORGETS clause to hilite the current entry field this presented a problem as a checkbox does not get hilited in the same way a DCGET field does.

So I thought I would vertically and horizontally center the tickbox in a square static object that I could manipulate the color of to get a focus hilite.

Sounded simple, but of course, it wasn't. The size of the tickbox object is not the same as the size of the actual tickbox itself so centering it is nearly impossible unless there is some trick I'm missing.

I managed to get something working that looked reasonable but it's not as clean as I would have liked.

What does everyone else think? Is there a trick to getting the correct size to allow the positioning to work correctly?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Post Reply