mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
I managed to create a listbox /window, it satisfies my needs, except one: i need the text to be wrapped so that it wouldn't be typed outside the visible part of the window. How to do this?

Hmm... And can i create a /dialog with a textbox, that would be disabled (user can copy text, but not change it) and have word wrap switched on?

Thanks for your attention.


-= endless in a victory of a yourself =-
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
/help $wrap


-KingTomato
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
Please, could you give an example? It gives only a single wrapped line or a paragraph of wrapped lines?

Can i set a paragraph into a variable?

Last edited by MauS; 05/11/03 04:52 PM.

-= endless in a victory of a yourself =-
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Break it into a paragraph using the $wrap identifyier. use the N property to get line N of the paragraph. Set how wide you have of a space to work with, then it should break it into wrapped portions for you.


-KingTomato
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
To set how many pixels $wrap() should work with, you might want to try $window().dw (or .dh); take a further look at the help file.

P.S.: since the .dw and .dh properties are related only to non-listbox text @windows, you could temporarily use a hidden, non-listbox one with the same dimensions as the listbox one, then get its .dw and .dh dimensions.
Doing this, though, you'd wrap lines with some offset to the left, because that hidden window would calculate its display width subtracting the scrollbar width, something that listbox windows don't have.

A solution for that (that I know of) would be using a DLL, one that gets the scrollbar width for you, checking your OS settings etc. I'm sure there is one at www.mircscripts.org, I think it was made by dohcan, but I can't remember its name, and I don't know if it'll load properly on the latest mIRC version (it's a little old). Do some search there if you want it.

Last edited by cold; 05/11/03 11:21 PM.

* cold edits his posts 24/7
Joined: Sep 2003
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Sep 2003
Posts: 58
The answer on the question about the editbox in a dialog...

How to make the text in an editbox good for copying but not for changing...

Use the read-only option

edit "Your text", 1, 5 5 30 10, read

Something like this...

Grtzzz


***************************
To chat, or not to chat.
That's the question

Link Copied to Clipboard