Notifications
Clear all

[Closed] listbox: force horizontal scrollbar possible ?

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 ?

2 Replies

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.

well – thanks for the answer…
i guess i go with the string manipulation than…some kind of auto-ellipsing…