TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started 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:
- Using "fixed_width_font = true;" ~ This works, but the font is quite large and doesn't look right
- Using Tabs in the text string ~ Doesn't work
- 'Padding' the string with spaces to get a desired length ~ Doesn't work with non-fixed width fonts
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
-
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;
}
-
Aha! Many thanks Kerry, I shall give that a go!
My incomplete knowledge of DCL showing... :oops:
-
Perfect Kerry - exactly what was needed :-)
Many thanks,
Lee
-
Most welcome !
Have a look at the Tab_Truncate attribute as well.
-
Excellent! That's two new things discovered today :wink:
Thanks Kerry :-)
-
[off topic] :wink:
I just noticed how closely that .DCL code resembles C# code
-
[off topic] :wink:
I just noticed how closely that .DCL code resembles C# code
Never dabbled in C#... is format the same then? :|
-
just similar ...
There's something comforting about seeing statement terminators < ; > and code block identifiers < { .. } >