B4J Question [ABMaterial] [SOLVED} Grid Created with "VISIBILITY_HIDE_ALL"; Visibility change

Cableguy

Expert
Licensed User
Longtime User
Hi Guys,

In order to avoid deleting and recreating the a container's GRID over and over again, I went with creating a single 4 Rows Grid (different nunber of cells in each row) and define its starting visibility to "_HIDE_ALL".
Then when I need to change each row visibility with the visibitily propertie, Nothing happens!!
I kinda of got it to work, by setting the visibility propertie for each cell of the entire Grid, one by one.
So it kinda of works, but the rows corresponding to the cells that stay "HIDE_ALL" still "occupy" its space.
So if I only want to see the 2nd row, I set each cell in the second row to be visible, but I get a vertical offset that I can only imagine it to be the 1rst row and also an offset below correspondig to Rows 3 and 4 (?)

This kind of puzzles me because if we create an empty Grid, it takes amost no space when we set the ShowGrid = True
 

Harris

Expert
Licensed User
Longtime User
Seems rather obvious that you would , but did you call row(x).refresh after changing the visible state?
I also use a single row and put 4 tables into it, showing and hiding these components when required.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Seems rather obvious that you would , but did you call row(x).refresh after changing the visible state?
Yes I did. I tried a different number of possible "workarounds" but none worked.
Something popped to mind yesterday and I will test it during the day.... can the spaces be due to the default padding between rows?
 
Last edited:
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
SO....

I had made a very "stupid" mistake, and instead of declaring the ROW as invisible, I was delcaring the CELLs as invisible, thus setting the row visibility to _ALL didn't do a thing because it was already visible.
To add to this mistake, I had the ROW paddings set to 20 as by default.
Going back to grid builder, changeing the above parameters, and giving a new spin... be back in a few minutes!

YEAP! That SOLVED IT!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…