B4J Question MainForm Size in %x and %Y

Discussion in 'B4J Questions' started by Douglas Farias, Jul 29, 2015.

Similar threads

B4J Tutorial [B4X] Resumable Subs - Sleep / Wait For
B4J Tutorial SQL Tutorial
B4J Tutorial Pagination Container
B4J Tutorial Unhandled exceptions
B4J Tutorial Accordion container
  1. Douglas Farias

    Douglas Farias Expert Licensed User

    Hi
    How can i set the mainform size in %x and %y ? when i use this values with % dont compile and give error.

    I need to use this, my app need of this on all screens possible.

    Left = 20%x
    Width = 80%x
    Height = 75%y
    Top = 25%y

    How can i set this values on the main form?
     
    dkerr likes this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    In B4J %x and %y are only available in the designer script.
     
  3. Douglas Farias

    Douglas Farias Expert Licensed User

    any other way to set the form site responsive? like %x and %y?
    i dont know if use fix values like 800 600 are a good way :(
     
  4. Enrique Gonzalez R

    Enrique Gonzalez R Well-Known Member Licensed User

    i am not sure if this is right but may be it works?

    Code:
    Sub jperxtocurrent(value As Int) As int
    Dim x As Int

    x = value/
    100 * MainForm.Width

    Return x

    End Sub
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    The problem is that the screen size can change all the time. If you set it in the designer script then it will be updated automatically.
     
    Douglas Farias likes this.
Loading...