mIRC Homepage
Posted By: LocutusofBorg listbox style request - 25/10/03 12:16 PM
I would like to see the dialog listbox have the optional style to right-justify, just like you can with a text item and a edit box...
Posted By: lammkott Re: listbox style request - 25/10/03 03:15 PM
Don't forget center.
Posted By: KingTomato Re: listbox style request - 25/10/03 03:30 PM
I don't think listbox has a font align property. I was looking in my compiler, and I can't find it. I am looking in C#, but the closest I could get was String.Format and force it to the right, but this only works with fixed-width fonts.
Posted By: LocutusofBorg Re: listbox style request - 25/10/03 03:47 PM
How come text and editbox items can do it then ?
Posted By: KingTomato Re: listbox style request - 25/10/03 03:49 PM
Editbox items have that property, though the listbox appears as though it doesn't..

If you have a control (this.editBox1) there is a property (.TextAlign) that can be set..

i.e.
this.editBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right/Left/Center;

However, there is no TextAlign property in a listbox--wierd.
Posted By: pheonix Re: listbox style request - 25/10/03 05:23 PM
wouldn't it be possible to script it though, use the same method as aligned themes and mdx's SetFont to get a fixed width font :tongue:
Posted By: KingTomato Re: listbox style request - 25/10/03 06:43 PM
For it to work, Khaled would need to allow multiple spacing sequences so you can do the "whitepace" needed to push it over..

Code:
+---------------------------------------------------------+
| Uber ASCII Dialog >:P                        [_][[]][X] |
+---------------------------------------------------------+
| My Listbox                                              |
| +-----------------------------------------------------+ |
| | . . . . . . . . . . . . . . . . . . .This Is Item 1 | |
| | . . . . . . . . . . . . . . . . . . .Item 2 Is Here | |
| | . . . . . . . . . . . . . . . .This would be item 3 | |
| | . . . . . . . . . . . . . . . . . . . . . . . . etc | |
| |                                                     | |
| |                                                     | |
| +-----------------------------------------------------+ |
|                                                         |
|                                      [ CANCEL ][ OKAY ] |
|                                                         |
+---------------------------------------------------------+

the ". . . ." are of course spaces. You cant send all those spaces to mirc, so its not really possible. unless Khaled made an eception to the /did command.

Also, if you wanted mIRC to do it on its own, Khaled would have to know how many spaces a ccross your dialog is (using the width as a reference), then could do a facsimileof "padding" the string, and changing the font.
Posted By: pheonix Re: listbox style request - 25/10/03 06:55 PM
$chr(160) wink
ah, didn't think about the listbox-width problem :tongue:
Posted By: LocutusofBorg Re: listbox style request - 25/10/03 08:58 PM
As I said before -- that's nice for a fixed-width font, but I haven't used a fixed-width font since I got rid of my last DOS programs. Prefixing hard spaces doesn't work on proportional fonts.
Posted By: argv0 Re: listbox style request - 26/10/03 12:52 AM
fixed-width is your friend
Posted By: pheonix Re: listbox style request - 26/10/03 01:02 AM
bright.fon is your soulmate.
© mIRC Discussion Forums