Results 1 to 6 of 6

Thread: Fill remaining space in container with Commandbutton

  1. #1

    Fill remaining space in container with Commandbutton

    Suppose I have a container with a vertical layout and a number of controls. Finally, I add a Commandbutton to the container and would like the height and width of the CommandButton to fill the remaining space in the container. What settings do I need to use on the Commandbutton to get that to happen?

    Thanks,
    Scott

  2. #2
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Hi Scott,

    Something like this in custom section?

    Code:
    proc page1_section1
    page1_section1 = createobject("page1_section1")
     
    page1_section1.addobject("viewport","container")
    viewport.layout ="V"
    
    viewport.addObject('textbox1', 'textbox')
    viewport.addObject('textbox2', 'textbox')
    
    page1_section1.addobject("viewport2","container")
    
    viewport2.addObject('mybutton', 'commandbutton')
    
    mybutton.autosize = 1
    mybutton.backcolor = "blue"
    
    return page1_section1

    Add a containter last, then commandbutton inside it, with autosize=1

    See more info about containers: http://www.lianja.com/community/show...wers-Container

    Josip
    Last edited by josipradnik; 2016-12-16 at 12:58.

  3. #3
    Hi Scott,

    In some cases, I do what Josip mentioned, and in other cases, I use the grid layout.

    See Barry's post here.

    http://www.lianja.com/community/show...+%3D%27Grid%27


    Herb

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Quote Originally Posted by hmischel@diligentsystems.com View Post
    Hi Scott,

    In some cases, I do what Josip mentioned, and in other cases, I use the grid layout.

    See Barry's post here.

    http://www.lianja.com/community/show...+%3D%27Grid%27


    Herb
    Hi Herb,

    Indeed, custom grid layouts are extremely powerful and they work very well for web and mobile apps too. In Lianja 4.0 form sections will be able to be laid out using a grid layout. Basically, you check the "Custom Grid layout" section attribute then you specify the row, column, nrows and ncolumns for each formitem (field and gadget). This provides responsive formitem positioning and you can also specify fixedheight and fixedwidth for each individual formitem as well.
    Last edited by barrymavin; 2016-12-17 at 21:05.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Wow - Thats fantastic Barry!

  6. #6
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,185
    Yes, this is just what the "domain programmer" market needs: creating flexbox-type UI without the hassle and learning curve and inevitable edge cases that block progress. Since my clients are domain programmers, I am super-excited about this. It's the last piece of the Lianja puzzle for domain programmers that I needed.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us