B4J Question Change Button-image programatically [SOLVED] - GMan    
Oct 13, 2026
Button1.TooltipText = "Test"
'
Dim iv As ImageView..."))
SetGraphic(Button1, iv)
The image is not changing...
link: Thx...i got it already some miinutes after posting 🧐...
link: ?
https://www.b4x.com/android/forum/threads/button-with-icon-text.143447/#post-910044
and...
link: Stupid me (again)...
Bug? Button Images are not initialized properly - jmon    
Feb 18, 2014Hello,
I may have found a bug. When I set an image on to a button in the Designer, and then I want to set the image in the IDE, I get an error:
Program started.
main._appstart (java line: 52)
java.lang.RuntimeException: Object should first be initialized (ImageView).
at anywheresoftware...
link: Thanks for your example. the css approach sounds nice too....
link: )
imgButton.SetImage(fx.LoadImage(File.DirAssets, "Icon.png"))
End Sub
Note...
B4J Question Button with image - alfonsorento    
May 10, 2015Hello,
I want to put an image into a button in B4J.
How can I do it?...
link: You can use this code to add an ImageView to a button:
Sub SetGraphic(Btn As Button, Graphic...
B4J Tutorial [B4X]Turning Miscellaneous Image Shapes into Buttons - William Lancee    
May 5, 2022   
(10 reactions)This is just a bit of fun, inspired by a recent question about the shape of buttons.
Given an image... these techniques:
During the definition phase...
1. Create 2 layers (panels) one for the image and one...
link: I have modified the code in post #1 to place the shape id#s in a BitmapCreator object
and moved...
link: For a large shapecount, you could use the other color channels too or instead. Keep the transparenc...
link: image processing like impementation in opencv.
DrawCV.drawPath(path, xui.Color_ARGB(shapeCount, 255...
Share My Creation Creating javafx buttons with images - jkhazraji    
Sep 26, 2023   
(4 reactions) a considerable deal of research, trials and errors, and code organization..
It displays three buttons imported from javafx, two of them are with images.. their events were brought to b4j and used to... the buttons.
Have a nice day..
mRxBrJ6PP3E...
link:
Actually I was thinking about a button image / button icon for my b4j app some time ago...
link: Actually I was thinking about a button image / button icon for my b4j app some time ago...
B4J Question [CLOSED] SwiftButton Background Image not displaying/Visible - Jmu5667    
Jul 16, 2021Hello
Has anyone experienced the background image (ic_first_page_black_24dp.png) of a swiftbutton not being shown in the app, but it is displayed in the designer. Fontawesome/Materialicons/text all display, but no the background image. The image is added in the designer.
Regards
John....
link: It would appear that feature is not supported....
B4J Library B4J_Button_extra (Add images and enhance your buttons) - fernando1987    
Nov 21, 2021   
(2 reactions)122074
B4j_Button_extra
Autor: Fernando Arevalo
Version: 0.01
B4j_Button_extra
Functions:
Show (btn As Button, image As String, color1 As String, color2 As String, width As Int, heigth As Int...
Private Button1 As B4XView
Dim s As Button_extra
Private Button2 As Button
Private Button3 As Button
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
s.Initialize
s.show(Button1...
B4J Question B4J Button Images - Problems - rodmcm (first post)    
Aug 12, 2022Thanks for that... I have never learnt Java... perhaps now time to start...
link: From the Javafx javadoc. Search Google for javafx 8 javadoc. Or 11 if you want that. There is a weal...
link: Thanks for that. Where did you learn about the setgraphic actions? I would like to expand my learn...
link: image of the button, use the CSSUtils library.
Sub ButtonBOTTOM(BTN As Button)
CSSUtils...
B4J Question Button Image - BeneBarros (first post)    
Oct 13, 2016This can only be done with an external CSS file. See this example: https://www.b4x.com/android/forum...
link: You can set the image with the designer:
https://www.b4x.com/basic4android/images/SS-2016-10-13_09...
B4J Question Button image with Scene Builder - Giacomo (first post)    
Jan 6, 2016BINGO !!!
thanks;)...
link: I know how to do it with Java Scene Builder 2.0.
You can drag an imageview onto your button, in...
link: How can I insert an image into a button using Scene Builder?
I can only do this with the code?
If...
Page: 1  
2  
3  
4  
5  
6  
7