Jump to content

TabControl - Buttons at bottom


gerhardhziegler

Recommended Posts

Dear friends,

does anyone of you have an idea, how I could style a TabControl, so that the buttons are shown at the bottom of the panel (also arranged like they are hanging at the botton).

I found some information on the sencha Website with the TabPosition Property of the "
Ext.tab.Panel", but it seems not to work or even causes an error.

Any suggestions greatly appreciated!


Gerhard Ziegler
Wien & Berlin

Link to comment
Share on other sites

Hi,

 

and, i just saw the buttons are ordered the right way but they are still at the top of the panel :|

 

Can you clarify ?!

 

And which edition and build are you using ?!

 

Best regards.

Link to comment
Share on other sites

I did. The buttons changed to hanging but the still were at the TOP of the panel.

https://www.dropbox.com/s/t6dg0w68l22tr4g/uni.png?dl=0

 

I made a screenshot. the first TabControl is without patch.

the second is with code, like you recommanded tabPosition = "bottom". As you can see, the buttons changed a little bit but but they are still at the top of the panel.

Link to comment
Share on other sites

UniPageControl1 -> ClientEvents -> UniEvents -> Ext.tab.Panel [tabPanel] -> tabPanel.beforeInit:

 

not function beforeInit

 

function tabPanel.beforeInit(sender, config)
{
    sender.tabPosition = "bottom"
}

 

post-906-0-23315800-1494072374_thumb.png

Link to comment
Share on other sites

I swear, I did it!!! 

https://www.dropbox.com/s/i3z7dwc14vq7733/ungi.png?dl=0

 

^^ Screenshot from Delphi IDE.

Also I have a "inner panel"?

 

 

 

UniPageControl1 -> ClientEvents -> UniEvents -> Ext.tab.Panel [tabPanel] -> tabPanel.beforeInit:

 

not function beforeInit

 

function tabPanel.beforeInit(sender, config)
{
    sender.tabPosition = "bottom"
}

 

attachicon.giftabPanel.png

Link to comment
Share on other sites

That would be great if its possible.

Meanwhile I have so many other questions concerning the "Accordion" layout and the tree grid (I wrote in another post). Seems I couldnt find a lot of new components in my installation.

 

And yes: Thanks a lot!

Link to comment
Share on other sites

Hi,

 

Can you try to use this approach for now (although, maybe isn't the optimal solution) ?!:

 

1. ClientEvents  -> UniEvents -> [Ext.tab.Panel]

function tabPanel.beforeInit(sender, config)
{
    config.tabPosition = "bottom";
}

2. ClientEvents  -> UniEvents -> [Ext.panel.Panel]

function boxready(sender, width, height, eOpts)
{
    var me=sender;
    if (me.items.items.length == 2) {
        var item1 = me.items.items[0];
        var item2 = me.items.items[1];
        var _y = item1.getY();
        item1.setY(_y+item2.getHeight()-1);
        item2.setY(_y);
        item2.setHeight(item2.getHeight()-item1.getHeight());
        item2.anchor = "0 -" + (height-item2.getHeight());
    }
}

post-906-0-32499900-1494262604_thumb.png

 

Best regards,

Link to comment
Share on other sites

Thanx I lot, but it doesnt work. Sorry, maybe I am too stupid.

 

I tried to write the second Code "Boxready" to the beforeInit of ext.panel.panel (i need to select one of the events, as I understood). 

But it crashes with an ajax error. Unexpected token function?

Should I put the code to afterCreate? Or AjaxRequest? Or AjaxCallback?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...