mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
I would like to put the text of a check in two lines.

Someone can help me?

Line:
check "&Adjust windows to Toolbar and Statusbar", 17, 19 120 150 14

And he wanted it to look like this:

Adjust windows to Toolbar
and Statusbar


TECO
irc.PTirc.org (Co-Admin)
Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
The text label for a checkbox control can't be split like that, but it's possible to fake it. One way is to use the first part of the text in the check, and make a text control under it with the rest of the line.
Code:
check "&Adjust windows to Toolbar", 17, 19 120 150 14
text "and Statusbar", 917, 35 136 150 14


You may need to adjust the location of the text control. For my setup 16px to the right and down fits nicely.

Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
That way I also know how to do it, but mIRC does allow this, because the Windows Group dialog has it, and somehow Khaled did it!


TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
does the style 'multi' not give you what you're seeking?

Joined: Aug 2016
Posts: 36
Ameglian cow
Offline
Ameglian cow
Joined: Aug 2016
Posts: 36
Well there you go... another undocumented feature. Never thought about that. I was trying to insert line breaks...

Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
Originally Posted By: maroon
does the style 'multi' not give you what you're seeking?


Thank you maroon.

Your suggestion has resulted. I just want to ask you one more thing. Is it possible to put the check on the first line as mIRC has in the Window Group dialog?

Example:


TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Unfortunately, it seems style 'top' doesn't work for the check control. You can fake it by beginning the check label like:

//did -ra dialogname check# $crlf $+ &Visible label

This is only practical if the visible text is split between 2 lines, and prevents the checkbox from being very close to another control above it.

It's also possible that mIRC gives itself access to things it doesn't give us, but I do see the wrapping you're talking about, and it's in quite a few places, such as mirc-options/display has several. Similar to what the other guy suggested above, a slightly better choice is to have the text for the checkbox be $null and have the entire wrap text be in a text control. You'll have to make the text control be very thin to keep the text from getting wiped when the checkbox is toggled. This example works for me without 'option dbu' enabled:

Quote:
check "", 17, 19 120 10 14
text "&Adjust windows to Toolbar and Statusbar", 917, 35 120 140 26


There are additional styles that could easily be enabled but aren't. For example, BUTTON always displays the text centered, when there are cases where I wish it would make it easy to have the text left/right justified.

Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
Too bad you do not know a solution, but your suggestion is not interesting. I do not try to pretend a solution, but to have it.

I hope Khaled will answer me and tell me the solution to this mystery.


TECO
irc.PTirc.org (Co-Admin)

Link Copied to Clipboard