Nevron Open Vision Documentation
User Interface / Widgets / Panels / Single Visible Panel
In This Topic
    Single Visible Panel
    In This Topic

    The NSingleVisiblePanel class represents a panel in which only a single child widget is visible at a time. The visible child widget is specified by its index, via the NSingleVisiblePanel-VisibleIndex property.

    The example below demonstrates how to create a single visible panel that contains 3 labels and instruct the panel to display the second label:

    Single Visible Panel Example
    Copy Code
    NSingleVisiblePanel panel = new NSingleVisiblePanel();
    panel.Add(new NLabel("This is label 0"));
    panel.Add(new NLabel("This is label 1"));
    panel.Add(new NLabel("This is label 2")); 
    panel.VisibleIndex = 1;
    
     Properties and Events

    The single visible panel provides the following properties:

    • VisibleIndex - the zero-based index of the currently visible child element. When the value of this property changes the VisibleIndexChanged event is fired.
    • VisibleElement - indicates the currently visible child element. When the value of this property changes, the VisibleIndex is automatically updated and the VisibleIndexChanged event is fired.
    • SizeToVisible - determines whether the panel should be sized to the visible element or to all contained elements.
    See Also