Generate interface elements through iteration

RoboFont Forums Help / General Generate interface elements through iteration

This topic contains 2 replies, has 2 voices, and was last updated by  Roberto Arista 5 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6095

    Roberto Arista
    Participant

    Hello RoboUsers!

    This question is a bit off topic because it concerns vanilla, but I think someone could help me anyway here.
    I am trying to generate some elements in an interface through an iteration over a dictionary.

    Starting from a list of colors stored into a csv file, I need to generate some controls in order to modify the colors.
    The first file attached is a sketch of what I want to achieve.
    The number of rows has to set automatically according to the number of the dictionary pairs.

    Here you can see a draft of my code:
    https://gist.github.com/roberto-arista/6b0dc3a7b46a874d56dd

    In the second attached file (screenshot) you can see what appears, only the first element of the dictionary is displayed.

    Does anyone has advices? Case studies to look at?
    Thanks!

    Attachments:
    You must be logged in to view attached files.
    #6098

    frederik
    Keymaster

    inside a vanilla.Group everything the position relative to the parent vanilla.Group. You are using the colors_y value to set the TextBox and ColorWell inside a group that you add to a window.

    posted a fix here https://gist.github.com/roberto-arista/6b0dc3a7b46a874d56dd

    good luck

    #6099

    Roberto Arista
    Participant

    Oh! This is quite embarrassing.
    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.