Scrollpanel updates being displayed, plus proposed change

May 1, 2009 at 6:19 PM
Firstly well done, I like the control.
But using the password app as a starting point I added a scrollable Panel to create a page with lots of information based around the page (buttons, icons textboxes etc) and provided a method to pass my data structure to the page.
On the page, upon update then updated the values on each of the controls, and called invalidate, but the items did not update and always stay at the orginal values.
I have replaced the base class to a panel an this works fine, and the updates of data items are reflected on the page so its something to do with the scrollable panel. I did find that I had to change the corredinate of the buttons though. ( I am not using the templates for the GUI, or the notify objects as I am not using lists for the page, just display the contents of a class with various types of controls.)

Please you someone advise on what needs to be called inorder to update controls on the scrollable panel, and anything else I need to do in order to get the scrolling of the panel working.

I also carried out a mod to the navigation which you may wish to consider. I added a Stack which I push onto when a forward is called, then on the navigateback pop of the stack and use this page number. The went further and allowed the navigate forward to specify which page you which to display.

May 18, 2009 at 11:42 PM

Hi Carin,

I had ran into the same problem.  The quick solution is to disable double buffering on the ScrollPanel.  The ScrollPanel doesn't correctly detect when child controls need to be updated vs what it has in buffer.

And BTW, I added the same mod to the navigation panel. ;-)

Jun 10, 2009 at 3:27 PM

hi Carin and cmymojo

I have the same problem, could you please share the solution on how to add a scrollable panel in Fluid?

Thanks

Jun 10, 2009 at 11:31 PM

Hi linwenchao,

If you have a class the overrides PageControl then add something similar in the InitControl method:

this.panel = new ScrollPanel(

                this.Bounds.X,

                this.Bounds.Y,

                this.Bounds.Width,

                this.Bounds.Height);


this.panel.BackColor = Color.White;

this.panel.EnableDoubleBuffer = false;

...

this.Control = this.panel;

Hope that helps,

 

Jun 11, 2009 at 7:13 AM

hi cmymojo,

Thanks for your replies!

but sorry, I can't make it works :(

I create a new class and overrides PageControl

 

namespace Fluid.Controls
{
    public class ScrollPageControl : PageControl
    {
        private ScrollPanel panel;
        public ScrollPageControl(string title)  : base(title)
        { }
        protected override void InitControl()
        {
            base.InitControl();
            this.panel = new ScrollPanel(
                this.Bounds.X,
                this.Bounds.Y,
                this.Bounds.Width,
                this.Bounds.Height);
            this.panel.BackColor = Color.White;
            this.panel.EnableDoubleBuffer = false;
            this.Control = this.panel;
        }
    }
}

 

and then I change Pages.cs,

 

...
categoriesPage = new ScrollPageControl("Categories");

 

/*
categoriesPage.Control = CategoriesListBox();
*/

...

 

FluidButton btn1 = new FluidButton("Just a scroll panel test", 10, 20, 100, 500);
categoriesListBox.Controls.Add(btn1);
//categoriesListBox.CategorySelected += new EventHandler(categoriesListBox_CategorySelected);

but there is no scroll bar in the screen and can't drag to the page bottom...

 

 

 

Jul 7, 2009 at 8:34 PM
Edited Jul 7, 2009 at 8:35 PM

Hi All,

I trying to do the same. I am getting stuck on having the ScrollPanel to scroll the containing control(s).

I've created my own DetailPanel which is just a simple Panel with some label controls. I am putting a single instance of this DetailPanel into to ScrollPanel but it does not scroll or anything.

 

To make it easy to understand what I mean I have created a small test application:

Screen
FluidScrollTest Source

I hope someone can help us with the scrollpanel :) Thanks!

Jul 9, 2009 at 4:34 AM

Perkonix:

Sorry, but I have not solved the problem...

 

someone help?

Aug 12, 2009 at 10:08 AM
Edited Aug 13, 2009 at 2:12 PM

hi

I have tried to add Active property into ScrollPanel class (

public override bool Active { get { return true; } }
). After that panel scrolls content. But content repainting works ugly. DoubleBuffer must be true, if it false panel does not scroll (but scroll bar is visible).