mIRC Homepage

Dialog-Windows with tabstops

Posted By: TC_Hessen

Dialog-Windows with tabstops - 16/05/10 01:02 PM


I think it would be a nice feature to add tabstops to edit-fields. In mirc incl. the last beta it is not possible to create a dialog like the original channel central.

The ban/e/I-lists uses a tab-stop to separate the hostmask from nick and date.
Posted By: argv0

Re: Dialog-Windows with tabstops - 16/05/10 09:33 PM

You can easily do this by padding with $chr(160) (which is now guaranteed to be U+00A0 non-breaking-space). mIRC is likely not using tabstops here either, but rather padding with spaces instead, so this will actually be the same method mIRC uses (but with nbsp instead of soft spaces).

alias rpad { return $1 $+ $str($chr(160),$calc($2 - $len($1))) }

//echo -a $rpad(hostname, 40) ; pads to 40 characters

To make sure you're padding properly, find the longest string and pad to that length (+ some extra space).
Posted By: drum

Re: Dialog-Windows with tabstops - 17/05/10 12:47 PM

Actually mIRC is using tab stops because the text is aligned despite using a variable width font.
Posted By: TC_Hessen

Re: Dialog-Windows with tabstops - 17/05/10 09:44 PM

Right, I do agree what drum told. Mirc uses not a monospaced font so using nonbreaking-space is not an option.

In custom windows it is possible to define tab-stops so it should be possible in any compotent where it make sense.
© 2021 mIRC Discussion Forums