is possible to scroll a container?
3 thoughts that come to mind.
1. If you really have to, you can simulate a scroll by using animate.
Its not ideal, but it can work.
See this video.
2. YoI can use a splitter to resize a container.
3. You can try to remove and then re-add conainers.
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?
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
in other cases, I use the grid layout.
You need to use a combination of “horizontal” layouts that contain “vertical” layouts as columns. Then as you add UI controls they can flow over to the next column. That’s just a coding issue you have to work through.
“grid” layouts are responsive.
Just to clarify, you have several layouts on a container.
They can be nested.
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.
In Lianja 3.2.1 we have added the abiity to embed a BROWSE command inside a container (desktop Apps only).
proc page1_section1 myCont = createObject("Container") select * from customers into cursor mycust myCont.browse("BROWSE keywords/columns/etc", "mycust")
You can re-execute the myCont.browse(…) command repeatedly. This causes the BROWSE grid to be replaced by the new BROWSE grid and data in the “alias” cursor. For best results assign a horizontal or vertical layout to the container.
You can nest containers inside a “grid” layout applied to a “Form” and then use the myForm.showDropDown(…) method to drop down complex pick lists which have data rendered inside the embedded browse grid.
Here is a better example showing how to handle a drop down pick list form with BROWSE embedded.
proc page1_section1 myform = createObject("Form") myform.resize(600, 500) myform.addObject("mycont", "Container") mycont.autosize = 1 mycont.layout = "V" select * from customers into cursor mycust // This could be a parameterized multi-table join mygrid = mycont.browse("browse noedit noactionbar", "mycust", "myclickhandler()", "mydblclickhandler()") // last 2 args are optional // note that the grid object is returned from browse() so you can set properties and call methods on it myform.showDropDown("page1.section1.field21", 400, 360)
The full syntax for BROWSE and its keywords can be found at:
When used inside a custom dropdown form this provides some great new functionality.