Hello all.
After finishing my B4a app. I am looking into B4J to create a new application.
I like to create a hospitality table reservation program. It should have the same layout as google calander. With names on the Y-ax and time on the x-ax. And be able to scroll in both directions.
I have been trying to get my head around this scrollpane, but i'm pulling my hair out at this point.
I like to add an object (button / label or "pane with a layout") to the scrollpane.
This object has a fixed hight and a variable width. At a fixed starting point.
The scrollpane must be able to scroll in both directions.
Is there an example i can use ?
is there a better way/object to use ?
Here is a bit off code i'm strugeling with. It should add a button at the clicked position.
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Please advice.
			
			After finishing my B4a app. I am looking into B4J to create a new application.
I like to create a hospitality table reservation program. It should have the same layout as google calander. With names on the Y-ax and time on the x-ax. And be able to scroll in both directions.
I have been trying to get my head around this scrollpane, but i'm pulling my hair out at this point.
I like to add an object (button / label or "pane with a layout") to the scrollpane.
This object has a fixed hight and a variable width. At a fixed starting point.
The scrollpane must be able to scroll in both directions.
Is there an example i can use ?
is there a better way/object to use ?
Here is a bit off code i'm strugeling with. It should add a button at the clicked position.
			
				B4X:
			
		
		
		Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
   
    Dim Sp As ScrollPane
    Dim pnl As Pane
   
End Sub
Sub AppStart (Form1 As Form, Args() As String)
   
    MainForm = Form1
    MainForm.SetFormStyle("UNIFIED")
    MainForm.RootPane.LoadLayout("LT1") 'Load the layout file.
    MainForm.Show
      
    Sp.Initialize("Sp") '// the scrollpanel as created on the layout "LT1"
   
    pnl = Sp.InnerNode  '// A pane as an innernode ? ( i assume its a panel inside a scrollpanel)
    pnl.Initialize("Pnl")
   
End Sub
Sub pn_MouseClicked (EventData As MouseEvent)
    Dim CmdReservering As Button 
   
    CmdReservering.Initialize("CmdReservering")
    pnl.AddNode(CmdReservering,EventData.X,EventData.y,100dip,100dip)
End SubPlease advice.
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		