TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Lee Mac on January 23, 2010, 08:12:54 PM

Title: List_Box Text Alignment
Post by: Lee Mac on January 23, 2010, 08:12:54 PM
Hi Guys,

I am trying to align text within a List_Box so that I may have two columns, for use in this thread (http://www.theswamp.org/index.php?topic=29124.0).

Things I have already tried:


I believe this is possible somehow, as MP uses this same idea in his AxProps program  (along with other neat tricks), but, of course, the source code for his routine is not available... so his secret is safe with him...

(http://www.theswamp.org/screens/leemac/example.png)

Any help or pointers are greatly appreciated :-)

Lee
Title: Re: List_Box Text Alignment
Post by: Kerry on January 23, 2010, 08:48:07 PM
It's a while since I've played with DCL, but ;
Have you tried the tabs attribute in the dcl definition file ?
Something like :
    : list_box {
        key = "list_box";
        tabs = "20 60 70";
        width = 75;
        height = 25;
    }
Title: Re: List_Box Text Alignment
Post by: Lee Mac on January 23, 2010, 08:52:35 PM
Aha!  Many thanks Kerry, I shall give that a go!

My incomplete knowledge of DCL showing...  :oops:
Title: Re: List_Box Text Alignment
Post by: Lee Mac on January 23, 2010, 09:00:52 PM
Perfect Kerry - exactly what was needed  :-)

Many thanks,

Lee
Title: Re: List_Box Text Alignment
Post by: Kerry on January 23, 2010, 09:02:13 PM

Most welcome !

Have a look at the Tab_Truncate attribute as well.
Title: Re: List_Box Text Alignment
Post by: Lee Mac on January 23, 2010, 09:10:24 PM
Excellent! That's two new things discovered today  :wink:

Thanks Kerry  :-)
Title: Re: List_Box Text Alignment
Post by: Kerry on January 23, 2010, 09:18:25 PM

 [off topic] :wink:

I just noticed how closely that .DCL code resembles C# code
Title: Re: List_Box Text Alignment
Post by: Lee Mac on January 23, 2010, 09:23:21 PM

 [off topic] :wink:

I just noticed how closely that .DCL code resembles C# code

Never dabbled in C#... is format the same then?  :|
Title: Re: List_Box Text Alignment
Post by: Kerry on January 23, 2010, 10:45:18 PM
just similar ...

There's something comforting about seeing statement terminators < ; > and code block identifiers < { .. }  >