Menu position

Posted by: fsegui on 10 June 2020, 10:44 am EST

    • Post Options:
    • Link

    Posted 10 June 2020, 10:44 am EST

    Hello,

    I have defined a Menu bar with several CommandLinks (and submenus).

    I want to have 3 CommandLinks on the left and 2 on the right.

    Is it possible to define a CommandLink position on the menu bar?

    Working with C1Command in VB.NET

  • Posted 11 June 2020, 12:09 am EST

    Hello Florent,

    The control does not support this kind of behavior; you cannot manually align the command links on different sides of the menu bar.

    Thanks,

    Prabhat Sharma.

  • Posted 11 June 2020, 3:13 am EST

    ok thanks for the quick reply, so it’s only possible with the C1Ribbon ?

  • Posted 12 June 2020, 4:59 am EST

    Hi Florent,

    Sorry but it is not possible with C1Ribbon as well but as a workaround, you can C1Toolbar with C1CommandDock to achieve your requirement as implemented in the attached sample.

    I hope it helps.

    Regards,

    Prabhat Sharma.

    C1ToolBar.zip

  • Posted 12 June 2020, 5:23 am EST

    Hi Prabhat Sharma

    Thanks for the sample, I’ll take a look. I think that could suite what I want to achieve.

    Another question regarding menu items, is it possible to change the height?

    Even if I change the font size, menu items (in context menu) are still a bit too big in height.

  • Posted 15 June 2020, 12:26 am EST

    Hi Florent,

    Sorry, it is not possible to change the height of the menu items but you can change the size of the menu items by changing the Font of the C1CommandDock in the last attached project.

    Regards,

    Prabhat Sharma.

  • Posted 16 June 2020, 10:45 am EST

    Hi Prahbat Sharma,

    I’ve taken a look at your sample. That works well but I encounter one issue: I’ve placed this on a MDI Form and I’m opening a child form.

    With this, another bar is added between the title bar and the CommandDock, bar that I did not have with C1MainMenu.

    There are also arrows for submenus, is it possible to remove them? I just want a picture button.

    Is there a possibility to remove it? (the child form is borderless)

  • Posted 17 June 2020, 7:15 am EST

    Hi Florent,

    >>With this, another bar is added between the title bar and the CommandDock

    Can you please share the screenshot by running the attached sample and indicate the bar that you are talking about or if you are doing something else then please modify the sample accordingly.

    Also indicate the arrow sign that you are talking about with the help of a screenshot.

    Regards,

    Prabhat Sharma.

    C1ToolBar_Mod.zip

  • Posted 17 June 2020, 7:46 am EST - Updated 3 October 2022, 11:49 pm EST

    Hi Prabhat Sharma,

    Here is a screenshot of your sample with the bar added. I’ve modified your sample according to my program where the child form start already Maximized.

    For arrows, here are 2 screenshots of my program:

    With C1MainMenu, no arrow for CommandMenu



    With ToolBar, arrow for CommandMenu

  • Posted 19 June 2020, 1:49 am EST

    Hi Florent,

    To maximize the child form without the border, use the code snippet in the last attached sample as given below:

     private void Command_Click(object sender, C1.Win.C1Command.ClickEventArgs e)
            {
                Form2 frm = new Form2();
                frm.Show();
                frm.FormBorderStyle = FormBorderStyle.None;
                frm.MdiParent = this;
                frm.BackColor = Color.Red;
                frm.Dock = DockStyle.Fill;
            }
    

    C1MainMenu and C1Toolbar are two different control so the behavior may differ between them. If you do not want the child menu item and the arrow button, use the C1Toolbar with C1Command only.

    Regards,

    Prabhat Sharma.

  • Posted 23 June 2020, 8:45 am EST

    Hi Prabhat Sharma,

    Yes, the behavior of C1ToolBar is not suitable for my application. I’ll stick to C1MainMenu.

    Thanks for your time.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels