B4J Question VBox & TextField Issue

LWGShane

Well-Known Member
Licensed User
Longtime User
I'm creating a wrapper for VBox and HBox (along with LinearLayout and UIStackView). I've completed VBox however, I have an issue with the TextField control: When I add one to the VBox, the VBox ignores its "PrefWidth" property.

I'm creating the wrappers instead of using the designer because this gives me more control over the UI and how/when it's generated.

Project is attached.
 

Attachments

  • VBox Issues.zip
    3.9 KB · Views: 250

Daestrum

Expert
Licensed User
Longtime User
I believe the width of the Vbox is dependant on the width of the items you add to it.
You can set the minimum and maximum width of the Vbox, and set whether the items take up the full width of the Vbox (providing they are resizable).
 
Upvote 0

LWGShane

Well-Known Member
Licensed User
Longtime User
@Daestrum - Thanks; looking at code examples, I solved it by calling VBox.setFillWidth(bool).
 
Upvote 0

LWGShane

Well-Known Member
Licensed User
Longtime User
Do you have a more recent version of this project that you can share ?

Sorry but no; it was too big of a project and was made somewhat irrelevant with xCustomListView.
 
Upvote 0
Top