Programatically control NavigationBar slider

Navigation for Windows Forms Forum

Posted 18 years ago by Chris Schuld - Owner / Senior Developer, Aztec Software
Avatar
Hi,

I'd like to find out if there is a way to programatically control the slider on the NavigationBar. I have ~ nine icons/buttons in the NavigationBar that I desire to be visible. --OR-- if the NavigationBar can/could restore it's previous saved settings/slider settings this would be great as well (similar to the location save of the Docking Manager). I looked in the help and nothing jumped out at me so I figured I would ask (the forum has become an excellent addition to the manuals).

Here is what I have now (I'll try to illustrate this in ASCII art [argh]):

+-----------------------+
|                       |
|                       |
|                       |
|                       |
|                       |
|  some controls here   |
|                       |
|                       |
|                       |
|                       |
|                       |
|                       |
+=======================+
| Button 1              |
+-----------------------+
| Button 2              |
+-----------------------+
| Button 3              |
+-----------------------+
| 4 | 5 | 6 | 7 | 8 | 9 |
+-----------------------+

Here is what I want to programmatically generate:

+-----------------------+
|                       |
|  some controls here   |
|                       |
+=======================+
| Button 1              |
+-----------------------+
| Button 2              |
+-----------------------+
| Button 3              |
+-----------------------+
| Button 4              |
+-----------------------+
| Button 5              |
+-----------------------+
| Button 6              |
+-----------------------+
| Button 7              |
+-----------------------+
| Button 8              |
+-----------------------+
| Button 9              |
+-----------------------+

Thanks,
Chris

Comments (4)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Chris,

That is some beautiful ASCII art! Reminds me of the good old DOS days. :)

You can change the MaximumBarButtonCount property to control that sort of thing. Fire up our sample form for NavigationBar and in the property grid, you can change the value to see how it affects the layout.


Actipro Software Support

Posted 18 years ago by Chris Schuld - Owner / Senior Developer, Aztec Software
Avatar
Ah, the good'ole days. Ok, this worked perfectly I can't believe I missed that obvious property, egg on my face!

Thanks,
Chris
Posted 18 years ago by Chris Schuld - Owner / Senior Developer, Aztec Software
Avatar
Hi,

Any chance I can get access to the number of buttons showing at any point in time? And as a follow up can I restore the bar to this number of showing buttons (I am trying to restore / save my window geometry for my users).

Thanks,
Chris
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I can write down to add a property for how many buttons are actually visible however the MaximumBarButtonCount property is what controls this. When the user drags the splitter, that property is updated. So in a sense, it is what the user desires the number of buttons to be, if they will fit. Make sense?


Actipro Software Support

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.