You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'd like to have a button with an image and a text below and I tried something like this:
container :=ToButtonnewlayout:BlLinearLayout vertical;
constraintsDo: [ :c | c horizontal fitContent. c vertical fitContent ].
background := (BlElementnewbackground:Color purple; size:200 asPoint).
label :=BlTextElementnewtext:'test';
constraintsDo: [ :c | c horizontal matchParent.
c vertical matchParent ].
container addChild: label;
addChild: background;
openInSpace
to have something similar to this:
but with the ability to click on the purple.
I know I could make my purple element as a button but I'd have 2 buttons available to click and I wanted to know If there's a possibility to make one and only button.
Thanks a lot
The text was updated successfully, but these errors were encountered:
example_toButtonWithTextAndIconVertical
| butspace |
but :=ToButtonnewpadding: (BlInsetsall:4); beVertical.
but label: (ToLabeltext:'Button').
but iconImage: (BlElementnewsize:60 @ 20;
background: (Color blue alpha:0.2);
yourself).
but layout cellSpacing:5.
but whenClickedDo: [ :ann | but icon background:Color random ].
space :=BlSpacenew.
space root addChild: but.
space show
Hello, I'd like to have a button with an image and a text below and I tried something like this:
to have something similar to this:
but with the ability to click on the purple.
I know I could make my purple element as a button but I'd have 2 buttons available to click and I wanted to know If there's a possibility to make one and only button.
Thanks a lot
The text was updated successfully, but these errors were encountered: