mIRC Home    About    Download    Register    News    Help

Print Thread
Custom dialog multiline checkbox #260838 24/06/17 12:31 PM
Joined: Jul 2014
Posts: 138
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 138
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)
Re: Custom dialog multiline checkbox [Re: TECO] #260839 24/06/17 04:34 PM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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.

Re: Custom dialog multiline checkbox [Re: ruprecht] #260840 24/06/17 07:29 PM
Joined: Jul 2014
Posts: 138
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 138
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)
Re: Custom dialog multiline checkbox [Re: TECO] #260841 24/06/17 09:16 PM
Joined: Jan 2004
Posts: 1,277
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,277
does the style 'multi' not give you what you're seeking?

Re: Custom dialog multiline checkbox [Re: maroon] #260843 25/06/17 03:52 AM
Joined: Aug 2016
Posts: 36
ruprecht Offline
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...

Re: Custom dialog multiline checkbox [Re: maroon] #260855 25/06/17 06:09 PM
Joined: Jul 2014
Posts: 138
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 138
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)
Re: Custom dialog multiline checkbox [Re: TECO] #260857 25/06/17 08:42 PM
Joined: Jan 2004
Posts: 1,277
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,277
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.

Re: Custom dialog multiline checkbox [Re: maroon] #260858 25/06/17 09:40 PM
Joined: Jul 2014
Posts: 138
TECO Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jul 2014
Posts: 138
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)