Sorry, the 'someFunctionToFillLayout' was the command for the button.
I forgot the "command="
As for refrencing the scroll layout I have no problem doing that I will
just make a 'partial' and include the reference to the layout. But I am not
sure how I can edit a scroll layout, more specifically there is no flags in
the scroll layout that I can use to edit what is inside a scroll layout:
http://download.autodesk.com/us/maya/2011help/CommandsPython/scrollLayout.html
At least what I can see,
I cant use[cmds.scrollLayout('myScrollLayout', e=True, text/label/value =
'blah')]
Is it possible to edit the children elements? without having to instance
them?
On Fri, Sep 23, 2016 at 2:27 PM, Justin Israel <[email protected]>
wrote:
> Have a look at the "command" parameter as well as the usage example at the
> bottom of this link
> http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-
> Docs/CommandsPython/button.html#flagcommand
>
> The missing bit from this example however is how to modify your scroll
> layout from the callback. What you should do is same the same of the scroll
> control that is returned when you first create it. 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 a topic in the
> Google Groups "Python Programming for Autodesk Maya" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/python_inside_maya/lCO4QBhy2U4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAPGFgA0ySWkHnvri6e4sJjuVn95xS
> ufv2b-rQYgN_L4oTAf%2BSA%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0ySWkHnvri6e4sJjuVn95xSufv2b-rQYgN_L4oTAf%2BSA%40mail.gmail.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/CAAD4CW7rv6msbKtMGYbHO0d_n%3DS9fn4o4xLxfr-%3DqiejTTMFYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.