none
Specify a controls position litdev RRS feed

  • Question

  • I have been searching for a while on how exactly you specify the position of a control on a graphics window as whenever I create a new one it just goes to the top right and I can see no way of changing that. Thanks.
    Sunday, January 10, 2016 11:12 AM

Answers

  • The Controls.Move works also for the LDControls:

    p1=LDControls.AddPasswordBox(50,40,30)
    p2=LDControls.AddPasswordBox(70,20,30)
    Controls.Move(p1,300,300)
    Controls.Move(p2,100,100)


    Jan [ WhTurner ] The Netherlands


    Sunday, January 10, 2016 12:11 PM
    Answerer
  • Hello EagleEye

    The Good news about controls is that you can use some of the Shapes Methods on them.

    checkBox1 = LDControls.AddCheckBox("checkBox1")
    
    Shapes.Move(checkBox1, 50, 50)
    Program.Delay(1000)
    
    LDShapes.Move(checkBox1, Shapes.GetLeft(checkBox1) + 50, 50)

    Sunday, January 10, 2016 12:14 PM
    Moderator

All replies

  • Use controls.Move.

    Also for Controls.Addbutton you have to supply x and y for the position. How do you use the Controls command?


    Jan [ WhTurner ] The Netherlands


    Sunday, January 10, 2016 11:23 AM
    Answerer
  • Thank you, I am aware that when using the controls included in small basic you can specify the X and Y position however when using litdev controls this does not seem to be the case.
    Sunday, January 10, 2016 11:46 AM
  • The Controls.Move works also for the LDControls:

    p1=LDControls.AddPasswordBox(50,40,30)
    p2=LDControls.AddPasswordBox(70,20,30)
    Controls.Move(p1,300,300)
    Controls.Move(p2,100,100)


    Jan [ WhTurner ] The Netherlands


    Sunday, January 10, 2016 12:11 PM
    Answerer
  • Hello EagleEye

    The Good news about controls is that you can use some of the Shapes Methods on them.

    checkBox1 = LDControls.AddCheckBox("checkBox1")
    
    Shapes.Move(checkBox1, 50, 50)
    Program.Delay(1000)
    
    LDShapes.Move(checkBox1, Shapes.GetLeft(checkBox1) + 50, 50)

    Sunday, January 10, 2016 12:14 PM
    Moderator
  • The Controls.Move works also for the LDControls:

    p1=LDControls.AddPasswordBox(50,40,30)
    p2=LDControls.AddPasswordBox(70,20,30)
    Controls.Move(p1,300,300)
    Controls.Move(p2,100,100)


    Jan [ WhTurner ] The Netherlands



    Thank You
    Sunday, January 10, 2016 12:41 PM
  • Hello EagleEye

    The Good news about controls is that you can use some of the Shapes Methods on them.

    checkBox1 = LDControls.AddCheckBox("checkBox1")
    
    Shapes.Move(checkBox1, 50, 50)
    Program.Delay(1000)
    
    LDShapes.Move(checkBox1, Shapes.GetLeft(checkBox1) + 50, 50)

    Thanks a lot
    Sunday, January 10, 2016 12:41 PM