PDA

View Full Version : [CLOSED] How to set TabPanel title as hyperlink?



gs_user
Jun 21, 2012, 3:49 AM
AS title,
How to set TabPanel title as hyperlink?

4391

geoffrey.mcgill
Jun 21, 2012, 4:06 AM
Hi,

I think you can just add raw html to the .Title property.

Example


<ext:Panel runat="server" Title="<a href='http://google.com/'>Tab 2</a>" />


That said, I also think the click/mousedown event is captured so clicking the link will not take you to another url.

If you want to link to another location, that functionality is not included with the TabPanel.

gs_user
Jun 21, 2012, 6:06 AM
this code can not direct to google.com
It's mean that tabpanel title no way to another url ??!!




<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="Viewport1" runat="server" Layout="border" >
<Items>
<ext:TabPanel ID="MainTab" runat="server" Width="1000" Height="700" Layout="AbsoluteLayout">
<Items>
<ext:Panel ID="paSel" runat="server" Height="600" Title="<a href='http://google.com/'>Tab 2</a>" >


</ext:Panel>
<ext:Panel ID="paPur" runat="server" Height="600" Title="<a href='http://google.com/'>Tab 3</a>">

</ext:Panel>
<ext:Panel ID="paStock" runat="server" Height="600" Title="<a href='http://google.com/'>Tab 4</a>">

</ext:Panel>
</Items>
</ext:TabPanel>
</Items>
</ext:Viewport>

geoffrey.mcgill
Jun 21, 2012, 6:20 AM
Hi,

One idea to try would be configuring the <Activate> Listener on the Tab you want to redirect. Then using JavaScript, set the browser window location to the Url you want to go to.

I believe setting the window.location.href property to a valid url will redirect.

Hope this helps.

gs_user
Jun 21, 2012, 7:36 AM
The work result is not expected, but still thanks for your help


Hi,

One idea to try would be configuring the <Activate> Listener on the Tab you want to redirect. Then using JavaScript, set the browser window location to the Url you want to go to.

I believe setting the window.location.href property to a valid url will redirect.

Hope this helps.

Daniil
Jun 21, 2012, 10:22 AM
Hi,

Could you clarify the initial requirement? Do you really need to use TabPanel?

TabPanel with AbsoluteLayout looks weird.