mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 36
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2002
Posts: 36
Hi,

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.


cu

TC / Mario
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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).

Code:
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).


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Dec 2002
Posts: 344
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 344
Actually mIRC is using tab stops because the text is aligned despite using a variable width font.

Joined: Dec 2002
Posts: 36
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2002
Posts: 36
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.


cu

TC / Mario

Link Copied to Clipboard