B4J Question [B4X] AS FloatingPanel Layout Disapearing

vascofire

Member
Hello everyone!

I downloaded the AS FloatingPanel example and the library from the forum, and I'm running it without any modifications.

The B4A file works without any issues, but the B4J file opens the panel with its layout correctly loaded only the first time it appears. When the panel is closed and reopened, it is maximized, and the layout disappears. Apparently, it doesn’t even recall the previous size.

I'm using B4J Version 10.00 (64-bit) and Java 14.0.1.
 
Solution
Should work now:
B4X:
#If B4J
Private Sub xlbl_ClickMe_MouseClicked (EventData As MouseEvent)
#Else
Private Sub xlbl_ClickMe_Click
#End If

    OpenPanel
    
End Sub

Private Sub OpenPanel
    
    fp.Initialize(Me,"fp",Root)
    fp.PreSize(200dip,200dip)
    fp.Panel.LoadLayout("frm_Content")
    fp.OpenOrientation = fp.OpenOrientation_RightBottom

    fp.ArrowVisible = True
    fp.ArrowProperties.Left = xlbl_ClickMe.Width/2
    fp.ArrowProperties.ArrowOrientation = fp.ArrowOrientation_Top
    fp.CloseOnTap = True

    'Under the Button
    Dim Top As Float = xlbl_ClickMe.Top + xlbl_ClickMe.Height + 10dip
    fp.Show(xlbl_ClickMe.Left,Top ,200dip,200dip)
    
    'Top of the Button
'    Dim Top As Float = xlbl_ClickMe.Top - 200dip -...

Alexander Stolte

Expert
Licensed User
Longtime User
Should work now:
B4X:
#If B4J
Private Sub xlbl_ClickMe_MouseClicked (EventData As MouseEvent)
#Else
Private Sub xlbl_ClickMe_Click
#End If

    OpenPanel
    
End Sub

Private Sub OpenPanel
    
    fp.Initialize(Me,"fp",Root)
    fp.PreSize(200dip,200dip)
    fp.Panel.LoadLayout("frm_Content")
    fp.OpenOrientation = fp.OpenOrientation_RightBottom

    fp.ArrowVisible = True
    fp.ArrowProperties.Left = xlbl_ClickMe.Width/2
    fp.ArrowProperties.ArrowOrientation = fp.ArrowOrientation_Top
    fp.CloseOnTap = True

    'Under the Button
    Dim Top As Float = xlbl_ClickMe.Top + xlbl_ClickMe.Height + 10dip
    fp.Show(xlbl_ClickMe.Left,Top ,200dip,200dip)
    
    'Top of the Button
'    Dim Top As Float = xlbl_ClickMe.Top - 200dip - 10dip
'    fp.Show(xlbl_ClickMe.Left,Top ,200dip,200dip)
    
End Sub
 

Attachments

  • AS_FloatingPanel.b4xlib
    2.7 KB · Views: 27
Upvote 1
Solution
Top