This is a migrated thread and some comments may be shown as answers.

Total height of PanelBar

3 Answers 79 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
nadiagi
Top achievements
Rank 1
nadiagi asked on 13 Nov 2008, 09:26 PM
Hi telerik team
I use the last build (evaluate version) of your controls. I want to develop a page to implement a Outlook navigation, based on your on line example. But I want also dock the panel bar at the bottom of my page, showing the maximum number of PanelBarItem in the available space (I using a RadSplitter too). Of course, if all panelbaritem are showed, the PanelBar must be docked on the bottom of the page.
To supply this functionality, I think that a good approach could be calculate the height of PanelBar in term of PanelBarItem elements, something of this:
(number of PanelBarItem) * (height of each PanelBarItem) = total space of PanelBar
Which is the height of each PanelBarItem? And what is the best approach to supply this information?
Thanks in advance
nadiagi

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 14 Nov 2008, 01:43 PM
Hi nadiagi,

You can use the Height property of the panelbar. You can also try setting the expandmode to fullexpandeditem.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
nadiagi
Top achievements
Rank 1
answered on 17 Nov 2008, 10:20 AM
Hi Albert,
thanks for your reply. My problem is the fact that panelbar has 100% height setting, but I need a way to calculate only the space occupied by PanelBarItem, what is the best approach?
Thanks in advance
nadiagi
0
Atanas Korchev
Telerik team
answered on 17 Nov 2008, 04:07 PM
Hello nadiagi,

Right now you can use the get_element() method of the panel item and then its offsetHeight attribute to get its height in pixels:

panelbar.get_items().getItem(0).get_element().offsetHeight

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
nadiagi
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
nadiagi
Top achievements
Rank 1
Share this question
or