Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 13th, 2003, 12:33 AM
Authorized User
 
Join Date: Jun 2003
Location: Dhahran, Eastern Province, Saudi Arabia.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Vertical Menu

I have been trying to create a Vertical Menu which will look a series of Command buttons having arrows on the right indicating sub menus (or sub commands). The sub menus will be visible when user clicks the arrow.

Any help with hints or code will be appreciated.
Reply With Quote
  #2 (permalink)  
Old October 13th, 2003, 09:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Sparks, NV, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jlick
Default

It is not fully clear to me what you are looking for, so I will make the following assumptions:
* The text of the menus should still be horizontal.
* The Menu Header should be on the left side of the window.
* You want the sub menus to work like current pop-up menus currently do.

I would put this into it's own OCX, so that you can reuse it.
Create an OCX project...
There will be two custom controls in this project. One that is each root menu item, and one that will be the menu header (on left side of window).

The idea here is that a standard pop-up menues aready work the way you want the sub menus to work. So all we need to do is create a menu header on the left side of the screen to act like the menu header at the top of the screen does.

The first thin we should do is get the graphic for the arrow pointing right. I would get/create the same one that you see when you use the standard menus for consistency.

Now create a new control with a label and a picture box. Use the UserControl_Resize to allign the picture of the arrow with the text.
Add a popup menu to the control, and add properties/functions to all the customization of the menu items at runtime. When the user clicks on this custom control, you should have it display the popup window. You may want to investigate how to have the popup align with the top & right of your control, so that it looks more like its directly connected to it.

Now create a new control that has one of you root menu items on it. (Make this a collection array). You will be adding more of these at run time.
Have this control display one of the other controls that you created for each root menu items (at runtime). It should manage the spacing between the controls, and the width of the controls for consistency.








John R Lick
JohnRLick@hotmail.com
Reply With Quote
  #3 (permalink)  
Old October 14th, 2003, 06:03 AM
Authorized User
 
Join Date: Jun 2003
Location: Dhahran, Eastern Province, Saudi Arabia.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks John

I think you got it right. The Popup menu will disappear as soon as user clicks the arrow. My submenu should be visible until use clicks the arrow again. The arrow will change from DownArrow to UpArrow on click. This type of menu is frequently used in Web pages.

I thought someone had a similar VB Control for this. I'll be able to do this from your hints using Labels and images.

Niaz
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vertical Labels bfoley CSS Cascading Style Sheets 2 November 26th, 2007 02:06 PM
Vertical alignment for a formula Slon Crystal Reports 1 April 16th, 2006 01:46 AM
CSS + HTML = Vertical Select Menu? kwilliams CSS Cascading Style Sheets 2 January 23rd, 2006 09:02 PM
how does one get vertical text in HTML? lcsgeek Classic ASP Professional 3 September 9th, 2004 08:47 PM
Vertical scrller applet sankar Java GUI 1 April 26th, 2004 08:43 PM



All times are GMT -4. The time now is 06:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.