B4J Library [custom view] GridManager

Discussion in 'B4J Libraries & Classes' started by Erel, May 4, 2017.

  1. Erel

    Erel Administrator Staff Member Licensed User

    [​IMG]

    A simple custom view which creates a grid of panes. You can set the number of columns and rows.

    The panes are resized automatically when the GridManager is resized, make sure to use anchors in your layouts.

    In this example the same layout is loaded in each of the panes. You can of course load different layouts.
     

    Attached Files:

  2. Roberto P.

    Roberto P. Well-Known Member Licensed User

    Erel,
    Would also be useful for B4A.
    thanks you
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    It should be simple to port it to B4A. Add a new custom view class and add the code from this class (you will need to make some small and hopefully trivial changes). There is no resize event in B4A as the activity is recreated when the screen size changes.
     
  4. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I'll try it.
    Regards
     
  5. swissmade

    swissmade Active Member Licensed User

    Nice this.
    Thanks Erel
     
  6. Mashiane

    Mashiane Expert Licensed User

    Hi, can one set the number of rows and columns at runtime if they are dependent on some variable perhaps?
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    It should be simple to modify the code and add a public sub that removes all nodes and creates new ones based on the new number of columns and rows. See the code in DesignerCreateView.
     
    B4JExplorer and Mashiane like this.
  8. jahswani

    jahswani Active Member Licensed User

    Ca this be made scroll able ?
     
  9. LucaMs

    LucaMs Expert Licensed User

    I know very little b4j (UI).

    Trying to do the same of what I would do in b4a, that is to create the view (GridManager1), remove it from its parent and add it to another parent), I obtained this junk.

    With small changes (resizing) you should succeed.

    (I prefer not to spend any more time on this test :)).
     

    Attached Files:

    Last edited: Jul 14, 2018
    jahswani likes this.
  10. jahswani

    jahswani Active Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice