I've come across some legacy code which uses SmartGWT. I suspect the API is present in standard GWT too.
widget.setWidth("*");
Keeping in mind that the same bit of code has:
otherWidget.setWidth100();
I'm not aware that CSS has anything like:
width: *;
So... is this code legitimate and if so what does it do... or not?!
Thanks in advance.
In SmartGWT .setWidth("*")
means take up the rest of the available width. For example, if you have a HPanel
with two children and one of the children has setWidth("10%")
then implicitly the child with setWidth("*"
) will have 90% width. This allows you to change the width of one child without having to update the other setWidth
call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With