yang-le / simple

Automatically exported from code.google.com/p/simple
0 stars 0 forks source link

Dynamic Form Row Col Layout not working #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
' Dynamic Table with a few buttons

Event Coltest.Initialize()
 ViewHistoryButtons()
End Event

Event buttonObj1.Click()
End Event

Event buttonObj2.Click()
End Event

Event buttonObj3.Click()
 Finish()
End Event  

' Declare some global vars

Dim table2 As Panel 
Dim count As Integer
Dim rows As Integer
Dim cols As Integer
Dim i As Integer
Dim buttonObj1 As Button 
Dim buttonObj2 As Button 
Dim buttonObj3 As Button   

Sub ViewHistoryButtons()
table2 = New Panel On Coltest
table2.Layout = 2
table2.Layout.Columns = 5
table2.Layout.Rows = 1
table2.Height = 40
table2.Width =  320

buttonObj1 = New Button On Coltest ' Add button to form.
buttonObj1.Text="Back"            
buttonObj1.Row = 1
buttonObj1.Column = 2

buttonObj2 = New Button On Coltest ' Add button to form.
buttonObj2.Text="Test"            
buttonObj2.Row = 1
buttonObj2.Column = 3

buttonObj3 = New Button On Coltest  ' Add button to form.
buttonObj3.Text= "Exit"            
buttonObj3.Row = 1
buttonObj3.Column = 4 
End Sub

' Begin Properties 
$Properties
$Source $Form
$Define Coltest $As Form
Layout = 1
Layout.Orientation = 1
Scrollable = True
$End $Define
$End $Properties

What is the expected output? What do you see instead?
All buttons should be on row 1,  Instead the all buttons act as if there
is a CRLF and the buttons are on different rows

What version of the product are you using? On what operating system?
Linux Simple v.1

Original issue reported on code.google.com by BobPer...@gmail.com on 10 Feb 2010 at 1:56

GoogleCodeExporter commented 9 years ago
have a look at this boring code:
* refers to a single button, -- refers to one button covers that space

*        *
 *      * 
  *    *  
   *  *
    **
    --
   ----
  ------
 --------
----------

this is an empty program except the properties, if you run this on your device, 
you may need to kill it by a taskmgr.
all the lines of the code is not edited by me but generated by a program of 
myself named vb for android, running on windows, but now I uploaded the src.
the idea was inspired by the source code of Teris, you might be interested.

Original comment by aslamic...@gmail.com on 19 Nov 2010 at 4:19

Attachments: