Welcome Guest Search | Active Topics | Sign In | Register

Submenu Centering Options
Afflicted
Posted: Thursday, September 13, 2007 2:14:46 PM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Hello,

Is it possible to center a submenu beneath its parent?

For instance, the following image shows what I am looking to do:



What I get is below:



Is this possible?
eo_support
Posted: Thursday, September 13, 2007 2:18:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
It's possible to do it manually, but not automatically. To do it manually, you would set the sub menu's OffsetX as a negetive number, that will move the sub menu towards the left of its original location.
Afflicted
Posted: Thursday, September 13, 2007 2:23:14 PM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
That's kind of what I thought... my submenu will be dynamic though. I guess that I would need to do some logic to count the number of items in the submenu and adjust the offsetX in the code-behind. Correct?
eo_support
Posted: Thursday, September 13, 2007 2:28:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Yes. You can do that. But it might get rather complicated. So if you only have a limited number of variations, it would be quicker to do it manually. :)
Afflicted
Posted: Thursday, September 13, 2007 2:33:03 PM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
How's about this (I don't know if this is possible):

Get the width of the submenu with all of its items, then offsetX = subMenuWidth / 2

Is there any way to get the submenu's width after the items have been added to it to facilitate the idea above?
eo_support
Posted: Thursday, September 13, 2007 2:37:13 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
You won't be able to do it that way because you can only get the width on the client side, where as OffsetX can only be set on the server side. :(
Afflicted
Posted: Thursday, September 13, 2007 2:38:51 PM
Rank: Advanced Member
Groups: Member

Joined: 9/13/2007
Posts: 51
Crud. Well I'll figure something out. Thanks for the quick responses :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.