Show Scrollbars in NGrouper


Author
Message
Fabian Baptista
Fabian Baptista
Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)
Group: Forum Members
Posts: 18, Visits: 1
Hi all,
I have a NGrouper control.
I'm adding dinamicaly controls to this grouper, but, i need that it can autoscroll, since i'm adding a lot of controls.
How can y do this?

Thanks in advance.
Fabián
Attachments
grouper.png (126 views, 17.00 KB)
Reply
Angel Chorbadzhiev
Angel Chorbadzhiev
Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)
Group: Forum Members
Posts: 139, Visits: 184

Hi Fabian,

Try to set the MinScrollSize property of the NUIPanel to the size of the containing rectangle of the controls in it.

For example you can modify the code you post as follows:

int height = 0;

for (int i = 0; i < 20; i++)

{

    m_Button2 = new NButton();

    m_Button2.Dock = DockStyle.Bottom;

    m_Button2.Text = "Click me!";

    m_Panel.Controls.Add(m_Button2);

    height += m_Button2.Height;

}

int width = nuiPanel1.Width - SystemInformation.VerticalScrollBarWidth - (2 * m_Panel.BorderWidth);

m_Panel.MinScrollSize = new Size(width , height);

I hope it helps.

Regards,

Angel.


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