B4J Question [SOLVED][B4XPage] Add an Icon to the Title

Cableguy

Expert
Licensed User
Longtime User
Hi guys...

I found a snippet showing how to add an Icon to a B4XPages page in B4A, but is there an equivalent for B4J?

 

DonManfred

Expert
Licensed User
Longtime User
A Page is a panel on a form (basically). You can place any layout yourself and add an Icon to it.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
A Page is a panel on a form (basically). You can place any layout yourself and add an Icon to it.
Not quite in B4J...

Setting B4XPages.SetTitle in B4J actually changes the form title itself (and not the root Pane, to were we add the views) ... and I would like to add an Icon to my title, just like in the B4A version...
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Try this:

B4X:
B4XPages.GetNativeParent(Me).Icon = xui.LoadBitmap(File.DirAssets,"formicon.png")

Sets the form icon.
 
Upvote 1

Cableguy

Expert
Licensed User
Longtime User
This is one of the very particular cases were the differences between platforms makes things work.... differently.
In this case, in the designer, there is an Icon property form the MainForm... and that was it!
Thanks for the replies!
 
Upvote 0
Top