B4J Question B4J Button Images - Problems - stevel05 (first post)    Aug 10, 2022   (1 reaction) That is the expected behaviour. the set graphic method on a node adds the graphic within the target node, thereby stretching the target node to allow it to fit.
If you want to change the background image of the button, use the CSSUtils library.
Sub ButtonBOTTOM(BTN As Button)
CSSUtils.SetBack B4J Question Image on Button - micro    Feb 03, 2016 Hi to all
another strange error.
I develope a program in b4j with more button and load on them image.
This with internal designer.
On raspberry, desktop pc (differents with win10) all image on button are visible, only on a Touch PanelPc con Win7 professional 64 bit all the button are without image.
B4J Question Can I put image in button node? - rossati    Feb 21, 2023 I apologize for not be able to found how create buttons with images.
The node buttons doesn't accept SetBackgroundImage function.
My be via style property?
Thanks B4J Question Button Image - BeneBarros    Oct 12, 2016 This is a function in B4A.
Is there a way to do similar to B4J? B4J Code Snippet {DSE] Button Shapes - stevel05    Sep 25, 2022   (14 reactions) RunMethod("setTextAlignment",Array(TA))
Next
End If
End Sub
'Create an oval or round button
'Parameters: 1 or more buttons
'Designer Script : {Class}.OvalButton(Button1)
Public Sub OvalButton(DesignerArgs As DesignerArgs)
If DesignerArgs.FirstRun Then
For i = 0 To Share My Creation Creating javafx buttons with images - jkhazraji (first post)    Sep 27, 2023   (1 reaction) Dim btn as JavaObject ' ' ' Dim imgPath As String =File.Combine(File.DirApp,"home32.png") btn=(Me).As(JavaObject).RunMethod("createButtonWithImage",Array("Home",imgPath)) (Me).As(JavaObject).RunMethod("addListener",Array(btn)) Form1.RootPane.AddNode(btn,60,30,0,0) Private Sub btn_click(msg As Strin B4J Question Customview not working (I need some help) - klaus (first post)    Oct 18, 2024 To draw the button, in your case, i would suggest to set once the button image to the ImageView. And then, instead of drawing a rotated bitmap just rotate the ImageView. Like mKnob.Rotation = xx. B4J Question Button image with Scene Builder - jmon (first post)    Jan 07, 2016 I know how to do it with Java Scene Builder 2.0.
You can drag an imageview onto your button, in the tree view of the controls (bottom left). Drag it over, and wait about 1 second, and you will see it will be added. B4J Question Lack of basic controls - jmon (first post)    Oct 12, 2016   (2 reactions) To set your button images, try this:
https://www.b4x.com/android/forum/threads/how-to-add-an-icon-to-a-button-via-code.57733/#post-363608
Then on the css of your button you need to set a padding:
CSSUtils.SetStyleProperty(btn, "-fx-padding", "4px")
Setting the padding with CSSUtils is the recommend B4J Question BCText - multiple buttons with tags - johnmie (first post)    Apr 21, 2022 Almost solved: I changed strategy since the same button can appear more than once on the same BBCodeview and on several expandable CLV views,
I create buttons only once as *.png images, save to AppData and wrap the images into commands. This offers flexibility in tems of size, text, color and actio Page: 1   2   3   4   5   6   7   Powered by ColBERT |