IonicWind Software

IWBasic => General Questions => Topic started by: Andy on July 14, 2013, 04:13:57 AM

Title: Full border around a checkbox / edit box etc
Post by: Andy on July 14, 2013, 04:13:57 AM
Hi,

I can't find an example of how to make a checkbox or edit box show a full border around it.

Example:

CONTROL dy,@EDIT,"",150,65,500,30,0x50810000,600

This gives an outline (left vertical) and (Top horizontal), but bottom horizontal and right vertical are not highlighted.

How do I change the above example so that all four lines are highlighted, i.e. it shows a box?

Thanks,
Andy.
Title: Re: Full border around a checkbox / edit box etc
Post by: Brian on July 14, 2013, 07:14:30 AM
Well, you could add in the WS_BORDER constant, which is 0x00800000
but an edit box with the constant, and one without, look just the same to me!

So your line would be:

CONTROL dy,@EDIT,"",150,65,500,30,0x50810000|0x00800000,600

Brian
Title: Re: Full border around a checkbox / edit box etc
Post by: Andy on July 14, 2013, 08:19:58 AM
Thanks Brian,

Sorry, that didn't work but I'm always thankful for any help or suggestions.

Thanks,
Andy.
:)
Title: Re: Full border around a checkbox / edit box etc
Post by: LarryMc on July 14, 2013, 09:22:30 AM
I think the best you can do without drawing the edit control yourself is

CONTROL dy,@EDIT,"",150,65,500,30,0x50410000,600
and then using the MODIFYEXSTYLE command to remove the 0x200 exstyle

If the edit control is on a window you can draw your own rectangle around the edit control.

As for a check box.  The outline of a checkbox includes the area around the text so if you are wanting to change the look of the little box itself you'll have to draw it yourself.
Title: Re: Full border around a checkbox / edit box etc
Post by: Brian on July 14, 2013, 11:45:47 AM
Larry,
You know, I keep forgetting about the richness of the commands that are available to us
in this language - forgot all about MODIFYEXSTYLE

Andy,
This works for me (alter params to suit):

CONTROL d1,@EDIT,"Edit",35,120,186,20,0x50800000,600
CONST WS_EX_CLIENTEDGE=0x200
MODIFYEXSTYLE d1,0,WS_EX_CLIENTEDGE,600
REDRAWFRAME d1,600

Brian
Title: Re: Full border around a checkbox / edit box etc
Post by: Andy on July 14, 2013, 01:37:57 PM
Brian,

That's perfect!

Thanks so much, you still walking along those canals?

Andy.
:)
Title: Re: Full border around a checkbox / edit box etc
Post by: Brian on July 15, 2013, 02:09:32 AM
Andy,
How did you remember that! Yes, we still have the walks, although I'm struggling at the moment
with arthritic hips and knees, so we don't go just as far. Glad that helped
Brian