B4J Question B4XDrawer example

josejad

Expert
Licensed User
Longtime User
Upvote 0

Chris2

Active Member
Licensed User
Longtime User
I started to look at B4XDrawer for a B4J app a while ago, but came to the conclusion that it was just as easy to add an off screen pane to the form layout and move it in and out as I wanted.
That way I had complete control over it (and what it contained), and could make it come in from the left, right, top or bottom.

So, I just had the 'drawer' pane off screen and with enabled=False & visible=False in the layout design, then:
B4X:
Private Sub ShowDrawer
    pnlDrawer.Enabled=True
    pnlDrawer.Visible=True
    pnlDrawer.SetLayoutAnimated(300, 0, 0, 200, MainForm.WindowHeight)
End Sub

Private Sub HideDrawer
    pnlDrawer.SetLayoutAnimated(300, -200, 0, 200, MainForm.WindowHeight)
    pnlDrawer.Enabled=False
    pnlDrawer.Visible=False
End Sub
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
Thats nice & simple.
Is it needed to be moved?
Isn't enable and visible = false enough?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…