Click here to Skip to main content
14,426,492 members
   

C#

 
AnswerRe: SOS..I need help with .dll files Pin
PIEBALDconsult22-Jul-08 13:26
professionalPIEBALDconsult22-Jul-08 13:26 
Questionlist of interfaces in C# needed Pin
asherhoo22-Jul-08 9:51
Memberasherhoo22-Jul-08 9:51 
AnswerRe: list of interfaces in C# needed Pin
Pete O'Hanlon22-Jul-08 10:30
communityengineerPete O'Hanlon22-Jul-08 10:30 
GeneralRe: list of interfaces in C# needed Pin
asherhoo22-Jul-08 11:07
Memberasherhoo22-Jul-08 11:07 
GeneralRe: list of interfaces in C# needed Pin
Pete O'Hanlon22-Jul-08 11:11
communityengineerPete O'Hanlon22-Jul-08 11:11 
GeneralRe: list of interfaces in C# needed Pin
asherhoo22-Jul-08 11:18
Memberasherhoo22-Jul-08 11:18 
AnswerRe: list of interfaces in C# needed Pin
PIEBALDconsult22-Jul-08 13:19
professionalPIEBALDconsult22-Jul-08 13:19 
QuestionHow to disable scroll in menu on visibility change Pin
AndrusM22-Jul-08 9:36
MemberAndrusM22-Jul-08 9:36 
To reproduce, run code, open file menu, press up and down arrows to move out of menu.

Observed: Menu items are scrolled and blank items appears in end.

I need to change visibility of menu items at runtime.
How to disable such scrolling ?

Is this .NET 3.5 bug ?

Andrus.


using System.Windows.Forms;

static class Program
{
    static void Main()
    {
        Application.Run(new Form1());
    }
}

class Form1 : Form
{
    public Form1()
    {
        var menuStrip1 = new MenuStrip();
        var fileToolStripMenuItem = new ToolStripMenuItem();
        menuStrip1.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem });
        for (int i = 0; i < 10; i++)
        {
            var item = new ToolStripMenuItem("Item" + i.ToString());
            fileToolStripMenuItem.DropDownItems.Add(item);
            if (i < 5)
                item.Visible = false;
        }

        fileToolStripMenuItem.Text = "File";
        Controls.Add(menuStrip1);
        MainMenuStrip = menuStrip1;
    }
}


Andrus

AnswerRe: How to disable scroll in menu on visibility change Pin
Luc Pattyn22-Jul-08 9:55
sitebuilderLuc Pattyn22-Jul-08 9:55 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM22-Jul-08 9:58
MemberAndrusM22-Jul-08 9:58 
GeneralRe: How to disable scroll in menu on visibility change Pin
Luc Pattyn22-Jul-08 10:43
sitebuilderLuc Pattyn22-Jul-08 10:43 
GeneralRe: How to disable scroll in menu on visibility change Pin
Wendelius22-Jul-08 10:59
mveWendelius22-Jul-08 10:59 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM23-Jul-08 5:16
MemberAndrusM23-Jul-08 5:16 
GeneralRe: How to disable scroll in menu on visibility change Pin
Wendelius23-Jul-08 5:57
mveWendelius23-Jul-08 5:57 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM23-Jul-08 5:04
MemberAndrusM23-Jul-08 5:04 
GeneralRe: How to disable scroll in menu on visibility change Pin
Luc Pattyn23-Jul-08 5:18
sitebuilderLuc Pattyn23-Jul-08 5:18 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM23-Jul-08 5:30
MemberAndrusM23-Jul-08 5:30 
GeneralRe: How to disable scroll in menu on visibility change Pin
Luc Pattyn23-Jul-08 5:46
sitebuilderLuc Pattyn23-Jul-08 5:46 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM23-Jul-08 6:36
MemberAndrusM23-Jul-08 6:36 
GeneralRe: How to disable scroll in menu on visibility change Pin
Luc Pattyn23-Jul-08 7:04
sitebuilderLuc Pattyn23-Jul-08 7:04 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM23-Jul-08 7:57
MemberAndrusM23-Jul-08 7:57 
GeneralRe: How to disable scroll in menu on visibility change Pin
AndrusM23-Jul-08 5:37
MemberAndrusM23-Jul-08 5:37 
Questiondropdownlist problem Pin
scottichrosaviakosmos22-Jul-08 9:09
Memberscottichrosaviakosmos22-Jul-08 9:09 
AnswerRe: dropdownlist problem Pin
carbon_golem22-Jul-08 9:51
Membercarbon_golem22-Jul-08 9:51 
AnswerRe: dropdownlist problem Pin
Shuaib wasif khan22-Jul-08 10:15
MemberShuaib wasif khan22-Jul-08 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.