Maya UI list of selectable options with controls


#1

I’m making a script that makes use of frames, and I’d like to have an area where it comes up with all the frames you’ve set, containing a few controls, and then run a command when one is clicked.

Something like this (screenshot from crashplan), but have the buttons (and editable text area) actually on the links:

If that’s not possible, then separate buttons would work, but I’d like some selectable options like that if possible. Does anyone know the command? I use pymel for the record, but if anyone knows the mel it’ll probably be easy to switch over.


#2

I believe you’re looking for textScrollList.


#3

Thanks a bunch, that seems to be everything I’m after :slight_smile:

Also just while I’m here, I just found that ‘scrollLayout’ dosen’t seem to adjust the max width of any nested items, so the scroll bars end up overlapping. I could hard code it, but I prefer avoiding that if possible, so I’m just curious if you or anyone has a nice solution to having things correctly fit?

Pic here of what I mean:


#4

It’s been a while since I’ve done any UI scripting, but IIRC, don’t use a scrollLayout in that case. Just use a standard row, column or form layout and set the size explicitly either in your textScrollList widget or in your layout (while disallowing children from resizing the layout). That should fix the size of the textScrollList and then you can use the textScrollList scroll bar accordingly.