May I ask a simple question about default chart commard toolbar position?


May I ask a simple question about default chart commard toolbar...
Author
Message
chunxia yang
chunxia yang
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1
I have a simple but confused me whole afternoon question:

I create a chart, and use NChartCommandBarsManager as default command tools, I want the toolbar to default dock to left instead of top, but I didn't find the right property, I know this maybe a very easy question, but I didn't find the answer even searching in the document and on the web.

I have to use

for (int i = 0; i < nChartCommandBarsManager1.Toolbars.Count; i++)

{

nChartCommandBarsManager1.Toolbars[i].Dock = DockStyle.Left;

}

This kind of working except that if the control is not tall enough, other toolbar still dock on the top.

Another similiar question is how to customize command before application runs, like only remain tools toolbar?

My way is not good at all: I use a loop, and try to get the toolbar's name:

if (desc!= ChartCommandRange.Tools.ToString())

{

toolbar.Hide();

}

I am just start to try to use nevron, any comments are hightly appreicated.

 


Reply
chunxia yang
chunxia yang
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1

Thanks for your answer

It works!!

I have one more question on this topic, what if I want to just remain some command in one group, for example, in Projection toolbar, I want to only remain zoom in/out command, currently I do the following:

if (desc == ChartCommandRange.Projection.ToString())

{

    foreach (var command in toolbar.Commands)

    {

        NCommand cmd = command as NCommand;

        string comText = cmd.ToString();

        if (comText != "Zoom In" && comText != "Zoom Out")

        {

           cmd.Properties.Visible = false;

        }

    }

}

 

I wandering if there are some better way to let me recoganize command except using the string. I find there is a enum ChartCommand, how use this enum?


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search