views:

317

answers:

1

My question may not make sense but I have valid reason.

We use .net smart client framework with CAB to develop window based application.

We have a trend view (smart client view) which plots graph of live data. We use ProEssentials graph control for the same. Trend view is tabbed with a tab workspace. But the client want to maximize the view when they like & see the live trend.

The issue is. how to I maximize the view which is tabbed in a tabbed workspace?

If I maximize the view, it should continue plotting the chart.

A: 

The simplest option would be to simply show a different screen/control that only has the chart on it.

If isn't entirely clear if you are using standard controls like TabControl for the tabbed view - if so, you should be able to take the chart out of the TabPage and re-add it at a higher level (hiding the TabControl etc) - something like (purely for illustration):

[STAThread]
static void Main()
{
    Application.EnableVisualStyles();
    Button button;
    TextBox textbox;

    using (Form form = new Form
    {
        Controls ={
            new TabControl { Dock = DockStyle.Fill, TabPages = {
                new TabPage { Text = "Tab Page", Controls = {
                    (textbox = new TextBox { Text = "I'm a graph control...",
                        Multiline = true, Dock = DockStyle.Fill})
                }}
            }},
            (button = new Button { Text = "Maximize", Dock = DockStyle.Bottom }),
    }}) {
        button.Click += delegate
        {
            textbox.Parent.Controls.Remove(textbox);
            form.Controls.Add(textbox);
            textbox.BringToFront();
        };
        Application.Run(form);
    }
}
Marc Gravell