B4J Question [SOLVED] Icons in Buttons not displaying when running??

Mashiane

Expert
Licensed User
Longtime User
Hi

I have an issue and I dont know what's the cause anyway. In my ide designer, the icons in the buttons show however when my app is running, they show as blocks. Any ideas?? See 4 buttons on the right of the screen

Icons.gif



Running...

icons.png


IDE Designer

ide.png


Can someone advise please...
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Set the padding to 0 using CSS.
the cause maybe that you are setting other properties of the button using CSS that alter the available font space.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
can you compare the button object properties at runtime (one with and one without the font), breakpoint at click, sender object.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Thanks @MarkusR for the hint, I relooked the property bag and my "text" property of the button was blank as I had removed its contents earlier on. I had thought that the text would display in the button. I have written text on that property now and now working properly even though the contents of the "text" property are not showing. I guess it expects something to be there irrespective of whether you are chosen FontAwesome or Material to use.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
Ok fine, maybe can Erel explain this behavior.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Frustrating, just noted that whilst it displays properly throughout, as soon as I click any of the buttons it reverts back to the blocks. Perhaps there is an interference with the custom control on the same page. I have css on the page but it affects the tableview and the listview only. So its one of those things for now.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Upvote 0
Top