B4J Question [ABMaterial] button in table footer

Harris

Expert
Licensed User
Longtime User
TripInspect_detail.png


B4X:
Sub tbldetlfooter_0___clicked(Target As String)

    ABMGentiInsp_deTNew

End Sub


(ADD NEW GROUP) and (ADD NEW DETAIL).
This works, for now... but what if I add a new button (or other control) to footer?
 

Harris

Expert
Licensed User
Longtime User

" I do see those two buttons in the footers, no? "


Yes, correct.

But, I did not think that "Sub tbldetlfooter_0___clicked(Target As String)" (yet it does)
would handle this button click event - since it is a button click within the footer and not a global "tbldetlfooter_0___clicked" event (which could have other views - controls).

If I added another ("button") in the "tbldetlfooter", how would I catch this event? Help my scrambled brain resolve this issue.

I would tend to think it would be the unique ID of the object (component) that would be raised.???
 
Last edited:
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
Indeed the footer shouldn't raise an event. (It's like a dead 'row' in the table). Not sure buttons in a table footer do raise events. You're pushing my framework to the very limits ;) as it was not intended for table footers to contain components.

I know you are way to far into your development, but I would've tried to design a 'block' with a container component. Something like:

----------------------
| tbl1 | container row 1, cell 1
| |
----------------------
| btn1 | btn2 | container row 2, cell 1 & 2
----------------------

That way buttons are not in the footer of the table, but just another component in the container control. They should raise the correct button events.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Leave it to me to do something like that!
I will try what you suggest and leave the footer for static text - as apparently it was meant for.

Thanks for pointing this out.
 
Upvote 0
Top