mIRC Home    About    Download    Register    News    Help

Print Thread
Dialog-Windows with tabstops #221403 16/05/10 01:02 PM
Joined: Dec 2002
Posts: 36
T
TC_Hessen Offline OP
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
Re: Dialog-Windows with tabstops [Re: TC_Hessen] #221414 16/05/10 09:33 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: Dialog-Windows with tabstops [Re: argv0] #221433 17/05/10 12:47 PM
Joined: Dec 2002
Posts: 344
D
drum Offline
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.

Re: Dialog-Windows with tabstops [Re: drum] #221440 17/05/10 09:44 PM
Joined: Dec 2002
Posts: 36
T
TC_Hessen Offline OP
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