What determines the height of a StableXui "tab-bar?"

66 views
Skip to first unread message

Mike Robinson

unread,
Mar 16, 2015, 8:40:57 AM3/16/15
to haxe...@googlegroups.com
I have a tab-bar which is supposed to have a graphic and text ... the text beneath it ("vertical").

What seems to be happening is that the tab is always shorter, such that the graphic and the text have to sit side-by-side and the top of the graphic gets cut off.

I've specified "AutoSize = true" and things got very strange indeed.  I've tried "AutoHeight."  Does anyone, like, have a little example of what they used?  :)

Alexander Kuzmenko

unread,
Mar 17, 2015, 8:39:54 AM3/17/15
to haxe...@googlegroups.com
TabStack.tabBar is actually a Box widget, so you can do with tabBar anything you ca ndo with Box.
Can you show your code?

понедельник, 16 марта 2015 г., 15:40:57 UTC+3 пользователь Mike Robinson написал:

Mike Robinson

unread,
Mar 17, 2015, 9:26:44 AM3/17/15
to haxe...@googlegroups.com
Here's some.  First, the defaults:

<TabPage>

<Default

skinName       = "'tabPage'"

    title-padding  = "5"

            title-highlightFormat-color = "0xFF0000"

            title-highlightFormat-bold  = "true"

            title-highlightOnSelect     = "true"

            title-states-up-skinName    = "'bottomUp'"

title-format-size = "10"

title-highlightFormat-size = "10"

            title-states-down-skinName  = "'bottomDown'"

title-text = "''"

title-autoSize = "false"

        title-icoBeforeLabel = "true"

title-vertical = "true"

title-unifyChildren = "true"

        title-apart          = "true"

/>

</TabPage>


Now the XML up through the first tab:


<Main 

id="'root'"

w="$Lib.current.stage.stageWidth" 

h="$Lib.current.stage.stageHeight" 

>


    <TabStack 

    name="'tabs'" 

    widthPt="100" 

    heightPt="100" 

    wrap="true" 

    tabBar-paddingLeft="20" 

    tabBar-childPadding="5"

    on-create="

        // Put the tab-bar on the bottom.

    

        $this.setChildIndex($this.tabBar, $this.numChildren - 1);

        $this.refresh();

    "

    >


        <TabPage

        name        = "'home_tab'"

title-states-up-ico-src = "'assets/gui/Home.png'"        

            title-states-down-ico-src = "'assets/gui/Home.png'"

title-text = "'Home'"        

        >

        <Box 

        widthPt="100"

        heightPt="100" 

        childPadding="10" 

        align="'left,top'"

        >  

        <VBox>

        <Text

        text="'The first page that you see when the app starts.'"

        >

        </Text>

        </VBox>    

        </Box>        

        </TabPage>

Alexander Kuzmenko

unread,
Mar 21, 2015, 5:07:42 PM3/21/15
to haxe...@googlegroups.com
I suppose you mean graphics drawn by skin. If it is so, then perhaps your skin graphics is larger than your tabBar height. Try to set height directly like tabBar-h="200"

вторник, 17 марта 2015 г., 16:26:44 UTC+3 пользователь Mike Robinson написал:

Mike Robinson

unread,
Mar 24, 2015, 9:20:41 AM3/24/15
to haxe...@googlegroups.com
Well, it's acting like the tab-bar is being constrained to be shorter than it "wants" to be, so that the graphic is somehow being shoehorned beside the text instead of above it.  I'll keep fiddling with it, and studying the source-code, and I'll report back when I finally find it.
Reply all
Reply to author
Forward
0 new messages