Jump to content

PageControl.TabPosition


Mortymer

Recommended Posts

Hello All,

 

How can I set tabposition in Pagecontrol component.

 

I found this lines in javascript code:

            OE3 = new Ext.Panel({
                id: "OE3_id",
                layout: "anchor",
                baseCls: "",
                width: 495,
                height: 213,
                x: 224,
                y: 122
            });
            OE3.nm = "OE3";
            _cdo_("GPWebPageControl1", OE3, null, MainForm);
            OF2 = new Ext.TabPanel({
                plain: true,
                anchor: "100% 100%",
                enableTabScroll: true,
                deferredRender: false,                
                layout: "absolute",
                id: "OF2_id",
                activeTab: 0
            });
            OF2.nm = "OF2";
            OF2.on("tabchange", function(P0, P1) {
                return Ext.Ajax.request({
                    url: "/HandleEvent",
                    params: "Ajax=1&IsEvent=1&Obj=OF2&Evt=tabchange&This=" + P0.nm + "&Tab=" + P1.nm + "" + _gv_(O10),
                    success: AjaxSuccess,
                    failure: AjaxFailure,
                    obj: OF2,

How can I insert

"tabPosition: 'left'," this codeline into

 

Ext.TabPanel definition section.

 

Thank you for any help or answer!

 

Mortymer

 

 

Link to comment
Share on other sites

Hi,

 

You may try this: (all client side code - js)

 

tabs.png

 

Project from here: http://www.3msoft.net/mhmd/Tabs.rar

function OnClick(sender, e)
{
 //switch position
 var tab1=MainForm.UniPageControl1.items.getAt(0).items.getAt(0);
 
 MainForm.UniPageControl1.items.getAt(0).items.getAt(0).tab.hide();
 MainForm.UniPageControl1.items.getAt(0).insert(2,tab1);
}

If you wish to add icons to tab's title like this:

 

tabss.png

 

You could use this code:

MainForm.UnipageControl1.items.getAt(0).items.getAt(0).setIconCls('stngs_icon');

and the css is:

.stngs_icon{  
    background-image: url("images/stngs.png") !important; 
}

I hope this help you... :rolleyes:

  • Upvote 1
Link to comment
Share on other sites

Thank you mohammad I try this solution :)

 

 

Hi,

 

You may try this: (all client side code - js)

 

tabs.png

 

Project from here: http://www.3msoft.net/mhmd/Tabs.rar

function OnClick(sender, e)
{
 //switch position
 var tab1=MainForm.UniPageControl1.items.getAt(0).items.getAt(0);
 
 MainForm.UniPageControl1.items.getAt(0).items.getAt(0).tab.hide();
 MainForm.UniPageControl1.items.getAt(0).insert(2,tab1);
}

If you wish to add icons to tab's title like this:

 

tabss.png

 

You could use this code:

MainForm.UnipageControl1.items.getAt(0).items.getAt(0).setIconCls('stngs_icon');

and the css is:

.stngs_icon{  
    background-image: url("images/stngs.png") !important; 
}

I hope this help you... :rolleyes:

Link to comment
Share on other sites

1. put the icon file in the dirsctory (you can find here any icon you want: http://www.findicons.com)

 

u2.png

 

2. add the css code to ServerModule-->CustomeCSS:

.stngs_icon{  
    background-image: url("images/stngs.png") !important; 
}

Important: the url directory depending on your settings in the servermodule->FilesFolder

 

if you didn't make any changes to "FilesFolder" then use this in the url: "files/images/stngs.png"

 

 

 

u1.png

 

3. Set the icon at run time:

 

u3.png

function OnAfterrender(sender)
{
  var obj=MainForm.UniPageControl1.items.getAt(0).items.getAt(0);
  obj.setIconCls('stngs_icon');
}

Project from here: http://www.3msoft.net/mhmd/tabs_icon.rar

 

Online from here: http://79.143.180.27/animateform/animateform.dll

 

 

Hope this will help you  ;)

  • Upvote 1
Link to comment
Share on other sites

hi guys

 

for I put icons on the tab only slightly change the way

 

in the event of unipageControl1 onbeforerender place the following code only modify the premium for one hope that works.

 

sender.items.getAt (0). items.getAt (0). setIconCls ('stngs_icon');
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...