On Sat, 24 Sep 2016, 9:27 AM Justin Israel <[email protected]> wrote:

> What you should do is same the same of the scroll control that is returned
> when you first create it.
>
Mobile typo...
Save the name.

You need that reference to be able to either edit the scrollLayout later in
> the button callback or to set it as the parent when adding more child UI
> controls. If you are writing your code as a class, this should be trivial
> because you can store the same of the scrollLayout as a member variable and
> read it later in the callback. If you are only using functions then you may
> need to capture the name into a function closure, either by defining your
> callback function right there in the same function as your layout, or
> looking at lambda or functools.partial
>
> Either way, I would recommend sticking to the approach of passing a
> callback function as opposed to the string form that Mel uses.
>
> Justin
>
> On Sat, 24 Sep 2016, 5:11 AM I73 <[email protected]> wrote:
>
>> Is it possible to populate a scroll list after the user preforms an
>> action?
>>
>>
>>              cmds.button('Fill Scroll layout', someFunctionToFillLayout)
>>              cmds.scrollLayout(...)
>>         #Want to fill the scroll layout with a list of verts after the
>> user clicks a button
>> for vert in verts:
>> cmds.text(vert)
>>      cmds.setParent('..')
>>
>> How can I achieve appending text inside the scroll layout once an
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/cd499b43-b31a-4ac2-bb75-4f179cab4a17%40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/cd499b43-b31a-4ac2-bb75-4f179cab4a17%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA17ueHFKCuW_h7%3DHXXtAGNLjh%3DPxpr0RkD7sDfLxit0dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to