PDA

View Full Version : listbox: force horizontal scrollbar possible ?


spacefrog
03-25-2009, 08:53 AM
thread title says it all.
I have a list of loooong strings i want to display in a listbox, but the are always left aligned and cut to the right. I don't want to code some string manipulation algorithm for this and
I know i can set this with .NET listboxes but than i would miss the backwards compatibility.

So ist there some hack that forces the horizontal scrollbar to be displayed? Or at least a way to force the listbox to be scrolled to the right automatically ?

EDIT:
well - sadly this seems not possible according to this thread from 2006
http://forums.cgsociety.org/showthread.php?f=98&t=422593

but if i could get hand of the window handle of my listbox i could some windows messages to it to enforce this .... any idea ?

ZeBoxx2
03-25-2009, 09:10 AM
you could get the hwnd of the control using UIAccessor - but maxscript itself lacks the access you require to add the scrollbar, as that is a Style, rather than a message or notification. You'd have to use an external utility to set the style.

You could fake your own sort of scrollbar, but you did mention you don't want to do string manipulation, so you may indeed be stuck.

I'd mostly look into cutting down the size of the strings anyway, though. Or make the listbox wider to begin with, perhaps :)

Or just leave things as is for 3ds Max 8 and below and use .NET anyway for 3ds Max 9 and up.

spacefrog
03-25-2009, 10:13 AM
well - thanks for the answer...
i guess i go with the string manipulation than....some kind of auto-ellipsing.....

CGTalk Moderation
03-25-2009, 10:13 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.