Dynamic layout using pictctrl?

    Aug 13 2011 | 4:35 pm
    I have 14 pictctrls placed next to eachother. I want to be able to hide the last pictctrls and move the first ones more to the center so that the series of pictctrls is always centred. Any ideas on how to do that?

    • Aug 14 2011 | 9:23 am
      you mean as in "rotate them"?
      what about script-recreate?
      otherwise one could use a bpatcher:
      for 10 controls, you would need to make a total of 19 of them, like this:
      01 02 03 04 05 06 07 08 09 10 01 02 03 04 05 06 7 08 09
      and then you can just move the bpatcher content from left to right.
    • Aug 14 2011 | 10:48 am
      Depending on how you're using them you might want to look in to the "dialmode" setting of [matrixctrl] which will allow you to create a single, long, side-by-side image and scroll through the individual pictures. If this works for you then it is much easier than rolling your own with [bpatcher] and the "offset" message.
    • Aug 14 2011 | 10:11 pm
      " Luke Hall: could you explain with an example? I never used matrixctrl: The idea is the following: The user gets a series of questions. Each question is represented with an image. He presses a button upon which the image changes to show he has 'responded' the question. When we will show the installation, the organisers want to be able to change the number of questions quickly. ideally I would have them set a number to set the number of questions and according images. That is the easy part: I want that the series of images is alway centred. As I am using bpatchers already, adding one more layer would start to get like inception, and I would like to keep a bit of overview over my patches. Anyway, if you could explain me the dialmode stuff, I would greatly appreciate it.
    • Aug 15 2011 | 11:16 pm
      if the number of questions will vary, dialmode won't work, it's tied to a specific number of states (and therefore image states).
      Are you showing only the current question/image, or can you see others next to it as well? If it's just the first one, I would just stack all your pictctrols on top of each other and script them to the front as needed:
      script bringtofront image_1 --> [thispatcher]
    • Aug 16 2011 | 11:26 am
      I will have to show the series of questions, so all the images should be next to each other. i think I will just make a separate version for each different number of questions. But if anyone knows a better solution, please do tell me.
    • Aug 16 2011 | 1:16 pm
      you could definitely do some calculations based on the image sizes, then script/place them according to the overall number. whether that's easier than making (say) three or four versions where you place them by hand, sometimes it is, sometimes not...but it can lead to some good learning when you fiddle with calculations like that, so it might be worth a try.