• Welcome to PlanetSquires Forums.
 

Designer Questions - Button Control, ZOrder, CheckBox Control, and Font

Started by SeaVipe, October 28, 2022, 04:33:45 PM

Previous topic - Next topic

SeaVipe

Hi Paul,
I know this is an old question, but is it possible for a button to have multi-line text?

How can I change the ZOrder of a Control?

Can a CheckBox style be set to Button?

Can a font style be set to inset (in particular, unthemed Buttons)?
Clive Richey

Paul Squires

Quote from: SeaVipe on October 28, 2022, 04:33:45 PMI know this is an old question, but is it possible for a button to have multi-line text?
I have implemented this by adding a "MultiLine" property for the Button control. In the visual designer you can embed a special phrase {br} that will break the string into lines. Without that phrase, the text will simply wordwrap based on natural line breaks. Behind the scenes, the {br} is converted to chr(10) linefeed and the text for the button is updated accordingly. The only restriction is that multiline text can only be displayed either left, center, or right aligned. It can not be centered vertically (this is a Windows limitation), therefore you would have to add one or more {br} at the start of your text in order to move the text down the control vertically.

QuoteHow can I change the ZOrder of a Control?
WinFBE outputs controls based on the TabIndex property thereby creating the zorder. If you need to have something that TabIndex can not provide then you would have to resort to using the Winapi function SetWindowPos() probably within your Form Load event.

QuoteCan a CheckBox style be set to Button?
Kind of but not really. You can add the BS_PUSHLIKE style to a checkbox but it will lose the "check box" and will act like a simple button that will maintain is pushed state. You can see this by adding code like the following to your form Load event.

  AfxAddWindowStyle( frmMain.Check1.hWindow, BS_PUSHLIKE )


QuoteCan a font style be set to inset (in particular, unthemed Buttons)?
I don't know of any standard way of doing this within Win32 other than probably assigning a special font that has been designed specifically to look like it is inset.

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

Clive Richey