Is TabView able to do autoresize?

I’m writing a little HaxeUI app: I have a window with a ViewTab with 3 tabs. I cannot set the TabView to autoresize when I resize the window. I surely am making some errors but I can’f figure it out. This is the code in the XML file I’m using:

<vbox width="640" style="padding: 5px;">
    <!-- tabview -->
    <hbox width="100%" style="padding: 2px;" >
        <tabview id="tabView" width="100%" height="480" style="padding:5px;" >
            <!-- first tab -->
            <box text="Encryption/Decryption" >
                <vbox width="620" style="padding: 5px;">
                    <hbox width="100%" style="padding: 5px;">
                        <box width="50">
                            <label text="File:" />
                        </box>
                        <box width="100%">
                            <textfield width="100%"/>
                        </box>
                        <box width="32">
                            <button width="32" icon="src/resources/icons/edit-clear.png" />
                        </box>
                        <box width="32"> 
                            <button width="32" icon="src/resources/icons/folder-open.png" style="padding:5px;" />
                        </box>
                    </hbox>
                </vbox>
            </box>
            <!-- second tab -->
            <box text="Hash">
            </box>
            <!-- third tab -->
            <box text="Password" >
            </box>
        </tabview>        
    </hbox>    
</vbox>

I also noticed that I can not create a TabView with no fixed size because it’s rendered with no size. If I change the line <vbox width="620" style="padding: 5px;"> with <vbox width="100%" style="padding: 5px;">, I get an empty window despite having set the primary vbox size to 640px.
Thank you for your help.

Hmm… it may be a bug with hxwidgets… maybe the tabs doesn’t support resizing…

In general
what you could try is use other backends in the same project ( depending on your code of course maybe it uses specific things)
so for example you could test on html5 and see if it works there … if it doesn’t work in html5 it means it surely a user error … if it works on html5 but not not hxwidgets … means it must be hxwidgets problem

(very) late to the party :confused:

But for completeness ill answer (super sorry for the crazy late upkeep of this forum!):

So, by default haxeui-hxwidgets will create a frame that will “fit” the components into the frame, that is, it will resize the top frame to match the root component - obviously this wont work with “100%”'s - which means things wont resize correctly. Its pretty easy to remedy, create a haxeui-hxwidgets.properties on your classpath (like in you /src directory), and add something like this to it:

haxe.ui.hxwidgets.frame.fit=false
haxe.ui.hxwidgets.frame.width=800
haxe.ui.hxwidgets.frame.height=600

You will have to give the frame a default size now (if you dont, thats fine, but it will default to 800x600 anyway), then with this markup:

<vbox width="100%" height="100%" style="padding: 5px;">
    <tabview id="tabView" width="100%" height="100%" >
        <vbox text="Page 1" width="100%" height="100%">
            <button text="Button 1" width="100%" height="100%" />
        </vbox>
        <vbox text="Page 2" width="100%" height="100%"/>
        <vbox text="Page 3" width="100%" height="100%" />
    </tabview>
</vbox>

you should get a fully resizable tabview (or anything):

Hope that helps

Cheers,
Ian

PS: the markup that you have seems a little “odd” btw, lots of uneeded “boxes” - just an fyi