Android Question Closed - B4XTable - remove header info

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I turned the buttons in the example into a floating (can drag) window (highlighted in magenta).
Going to turn the page number in the middle to a edittext so you can type in the page you want to go to.

Not always having enough room on phones is there anyway to get rid of all the header stuff (highlighted in red) in one shot?
When needed I would pop up a window to let the user type in.

1583694069593.png



While waiting - I updated the Drag Me to have an editfield for page number and moved the search icon to make the drag me box a little smaller.
So things do not look exactly like the drag me show.


Just update the example to have the search box show and work. Closing the search (clicking on the red search symbol) clears the search.

Did find some interesting things. After typing in data and clicking done on the keyboard for some reason B4XTable resized itself and show 2 more rows at the bottom that weren't shown at start up (looking into this)
 

Attachments

  • B4XTable Example.zip
    65.9 KB · Views: 189
Last edited:

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Thanks for the
Sleep(0)
B4XTable1.pnlHeader.Visible = False

But that only hides them. The space is not reclaimed (by reclaimed I mean that the grid would allow more entries)

Tried setting the pnlHeader.Height to 0 but that did nothing.


Oh, well


Sorry to be a pain with all these questions.
But if I could incorporate all this information into the drag box i could free up 2 lines for display, on my 7" tablet not a big thing but on my S7 2 extra lines is a lot.


A second part to this question would be is there an easy way to reproduce the messages you show:
I've added a line to the bottom of the drag box that will show the same messages. and when clicking on the Search show a edit text field to type in.

I've figured out how to do the normal message. But haven't figured out how to do the search message.

Would be nice if there was just a string the contained the whole message that we could grab and display instead of piecing together.


NO Search message

1583699291448.png



Message when search being done.
1583699269614.png



I'll stop now with all these posts.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
But that only hides them. The space is not reclaimed (by reclaimed I mean that the grid would allow more entries)

Did you try this (it will not crash):
B4X:
B4XTable1.pnlHeader.RemoveAllViews
or
B4X:
 B4XTable1.pnlHeader.RemoveViewFromParent
instead of: B4XTable1.pnlHeader.Visible = False
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Maybe I am doing something wrong:

This is what I had:
1583767782492.png


Which gives this:
1583767834365.png


When I change it to -60

1583767883465.png


I get this: The header gets chopped and I lost my black line

1583767927939.png
 

Attachments

  • B4XTable Example.zip
    65.9 KB · Views: 150
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Remove the AutoScaleAll call.

Put the Nothing panel in front of the table.

I worked hard so you won't need to write such code:
B4X:
    mSQLStatement = "Select  Songs.ID, Songs.Time, Songs.Song, Bys.Name, Titles.Title, ByID.TitleID, ByID.SongID, ByID.ByID, Titles.Path, Songs.FileName"     _
                           &"    FROM  Songs    "                                                                                                                 _
                             &"    INNER JOIN Titles ON (Songs.TitleID = Titles.ID)     "                                                                         _
                          &"    INNER JOIN ByID ON (Songs.ID = ByID.SongID)         "                                                                         _
                          &"    INNER JOIN Bys ON (ByID.ByID = Bys.ID)                 "                                                                        _
                        &"  WHERE  ( Songs.SpecialOptions & " &0x0000000020000000L &" ) = " &0x0000000020000000L &" "                                    _
                        &"  ORDER BY Songs.ID ASC, DateChanged DESC"

You should learn how to use smart strings.
[B4X] Smart String Literal
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
WOW, I struggling to fit the B4XTable (with it lack of 2d scrolling) into a old routine and you are picking on me for a copy (quick hard coded hack) & paste of a slice of code that was written long before the Smart strings was around.
 
Upvote 0
Top