|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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.
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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. :)
|
|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
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. :(
|
|
Rank: Advanced Member Groups: Member
Joined: 9/13/2007 Posts: 51
|
Crud. Well I'll figure something out. Thanks for the quick responses :)
|
|