B4J Question [SOLVED] From innernode to previous state... ?

Magma

Expert
Licensed User
Longtime User
Hi there...

Let's say we have a pane and a scrollpane...

B4X:
pane1.AddNode(scrollpane1,0,0,pane1.Width,pane1.Height)
pane1=scrollpane1.InnerNode

You set a pane to scrollpane as innernode... how can i return it to previous state programmatically ?

Thanks in advance...
 

stevel05

Expert
Licensed User
Longtime User
Your example does not make sense, by overwriting the pane with the scrollpane's inner node, the scrollpane will have no parent.

What are you trying to do?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
I have a sub that i am calling more than one time so i want to remove nodes and make the panes be like first time :)

Because the next time i will call it again will be new into them...

example:

B4X:
'at globals the scrollpane and pane

sub loadagain
   If ascroll.IsInitialized Then
        'rulerpane=
        'trackspane=              'seems must do something here.. ?
        'timepane=
        'myPane=
    End If
   
    ascroll.Initialize("ascroll1")
    trackscroll.Initialize("bscroll1")
    rulerscroll.Initialize("cscroll1")

   trackspane.AddNode(trackscroll,0,0,trackspane.Width,trackspane.Height)
   trackspane=trackscroll.InnerNode
   trackscroll.SetHScrollVisibility("NEVER")
   trackscroll.SetVScrollVisibility("NEVER")
     
   rulerpane.AddNode(rulerscroll,0,0,rulerpane.Width,rulerpane.Height)
   rulerpane=rulerscroll.InnerNode
   rulerscroll.SetHScrollVisibility("NEVER")
   rulerscroll.SetVScrollVisibility("NEVER")

  myPane.AddNode(ascroll,0,0,myPane.width,myPane.Height)
  myPane=ascroll.innernode

'.............

end sub
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
OK, but I still don't understand why you need to assign the scrollpane's inner node to it's parent. That could cause all sorts of problems.
 
Upvote 0
Top