2 Replies Latest reply on Sep 15, 2009 10:08 AM by lerooooogk

    About the independent of States or something similar

    lerooooogk

      Hi all,

       

      I'm having a little problem when I work with states.

       

      I have a VBox and inside I want to put 4 canvas.

       

      In the beginning, my app only shows 2 canvas and I want the user enables/disables (visible or not visible) the canvas (except the first one that it'll be always shown).

       

      I did a state for each canvas. But when for example user wants to make visible two (or three) at the same time, my app only shows the last one (last state).

       

      I tried to use "IncludeInLayout" & "Visible" properties but the problem when I use this is that the position of each canvas is the same always. I mean, each canvas has a position, and if one is not visible the rest of canvas keep the same position and there is a "hole" in the VBox.

       

      I'm not sure if I explained well. Sorry but my english is not very well.

       

      Thanks in advance.

        • 1. Re: About the independent of States or something similar
          Gregory Lafrance Level 6

          Yeah, I don't now exactly what you are referring to. Perhaps you could describe it one more time.

          • 2. Re: About the independent of States or something similar
            lerooooogk Level 1

            Sorry for my delay and thanks for the answer

             

            I'll try to explain it better with an easy sample.

             

            I have an app with one button (this is its base state) and it's on the top. After that, I do three states. The purpose is to add a button in each state.

             

            The problem is that I want each state is independent. I mean, my problem is that if I want to add two buttons at the same time its impossible.

             

            That is to say, for example:

             

            State Base

            • (button 0)

             

            State 1 (adds 1 button)

            State 2 (adds 2 button)

            State 3 (adds 3 button)

             

            I want that user can activate whatever buttons he wants. For example,

             

             

            • . 0       
            • . 2
            • . 3

             

            Or for example:

            • .0
            • 1.
            • 3.

             

            I cant get that working with states. Is there a way?

             

             

            Thanks a lot