Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2008 > Visual Basic 2008 Essentials
|
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2010, 10:08 PM
Registered User
 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default prevent menu collapse upon selection

I've got several menuitems on the same pulldown menu which are intended to be checked or unchecked by the user. I'll call these "cfg items". The checks are flags for configuration settings. I'd like the pulldown menu to not be collapsed during selection of these particular menuitems. This is because the user is likely to set several checks in a row. I've also got other menuitems which launch things in the application. I'll call these "typ items". These other menuitems should allow collapse as is typical. I tried calling PerformClick method for pulldown menu at the end of the event handler for "cfg items", but that didn't work. If there's an easy solution, I'd appreciate any help. Here's section of code....

Code:
Private Sub mnuRedundantDataFromDatabases_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuRedundantDataFromDatabases.Click
        mnuRedundantDataFromSolidworks.Checked = False
        mnuRedundantDataFromDatabases.Checked = True
        mnuMenu.PerformClick() 'intended to dropdown menu to appear like it didn't collapse (didn't work)
    End Sub
    Private Sub mnuRedundantDataFromSolidworks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuRedundantDataFromSolidworks.Click
        mnuRedundantDataFromDatabases.Checked = False
        mnuRedundantDataFromSolidworks.Checked = True
        mnuMenu.PerformClick() 'intended to dropdown menu to appear like it didn't collapse (didn't work)
    End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Menu Selection Too Fast bokiemon BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 0 August 26th, 2007 04:32 AM
Expand/Collapse Structure kanoorani Javascript 4 June 19th, 2007 03:54 AM
Menu / Dropdown List Selection Reduction larry101 Javascript How-To 2 September 20th, 2004 03:43 AM
open menu selection hosefo81 HTML Code Clinic 5 February 1st, 2004 02:30 AM
Expand/Collapse Data rafstar Classic ASP Basics 4 June 8th, 2003 10:12 PM





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