April 19, 2024, 03:27:18 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Quiet Checkboxes

Started by Andy, February 18, 2021, 05:09:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

This one is something simple, but I like check boxes to be "quiet".
By that I mean no rectangle around them when they are clicked.

There is a simple way to do this, it uses two controls

A checkbox & a static.

If we add the SS_NOTIFY style to the static control, we can detect it has been clicked on, and if we keep the checkbox width to just say 20 with no text we can place the static along side it.

Add in the SENDMESSAGE(w1,BM_CLICK....) message to the static's CASE statement  we can also make the checkbox do as it would do if it was actually clicked.

The bottom line is if we put these two together, it looks like a checkbox but you don't get the rectangle around the text.

Simple, but looks clean.

Just an idea for all of you who like a tidy ship.

See attached,

Andy.
 :)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Andy,

Doesn't BS_PUSHLIKE do something similar?

Brian

Andy

No idea Brian, you might be right, it's just that we can find a way to get rid of those rectangles around the text.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Sorry, Andy - I was wrong!

Brian