Forgot to mention, in the attachPosition section, the value increments you attach to are (100 / numberOfRadioButtons). So when you have 3 buttons, you use 33 and 67; if you had four: 25, 50, 75; etc.
To take it further you could also roll that core functionality (spacing an arbitrary number of widgets evenly in a row in a formLayout) into a function that makes setting up sets of buttons/radioButtons/etc a lot simpler. On Tuesday, December 18, 2012 1:27:22 PM UTC-8, Jesse Capper wrote: > radioButtonGrps can only have a single column adjustable, so you'll have to > use individual radiobuttons. > > When you want to have multiple ui elements in-line, be evenly spaced, and > scale with the window there are a few things you need to do: > - Attach the outside edges of the outer widgets to the form (or other > controls). > - Do not attach the widgets to each other (you had the inner RB > attachControl'd to the inner edges of the outer ones) > - Control the inside edges (of the outer widgets, and both edges of any > interior widgets) using attachPosition. > > Also you aren't going to get the exact behavior you want because of the fact > that radioButtons are always left-aligned, and thus the RB on the right side > won't stick to the edge of the form. > > Adjusted code: http://pastebin.com/HeHE4Mxj > > On Monday, December 17, 2012 8:53:58 PM UTC-8, Bradon Webb wrote: > > trying a slightly different way. > > > > by specifically calling the buttons individually. > > > > I can get 2 buttons to work well, but not 3. > > > > attached is the latest code -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected].
