B
Bruce
I created a control called ThumbPanel which derives from the
Forms.FlowLayoutPanel control. The ThumbPanel in turn holds and displays a
collection of ThumbNail controls (which is another custom control which
displays an image thumbnail and some metadata via text.)
Up until a couple days ago it all worked fine, but back then the ThumbPanel
derived simply from Forms.Control. I rearchitected it for several reasons,
but largely because I wanted to have the FlowLayoutPanel handle all the
layout for me, rather than having my code do a bunch of layout calculations
and deal with scrolling, etc.
But after my re-architecting to derive from FlowLayoutPanel the results are
broken. The ThumbPanel is never redrawn after I make calls on it that add
ThumbNails (images.) I set a breakpoint in ThumbPanel.OnPaint(), but it is
never called!?
The main form (in which the ThumbPanel is placed) does the following calls:
// This line assigns a new set of thumbnail images to be shown in
the ThumbPanel....
thumbPanel.AssetsSource = m_Model.CurrentDirAssets;
thumbPanel.Refresh();
After this line, I would have expected ThumbPanel.OnPaint() to be called,
but it is not.
Any recommendations how to debug this?
(I have not included code, since there it is more code than seems feasible
to include in this kind of posting.)
Thanks,
-- Bruce
Forms.FlowLayoutPanel control. The ThumbPanel in turn holds and displays a
collection of ThumbNail controls (which is another custom control which
displays an image thumbnail and some metadata via text.)
Up until a couple days ago it all worked fine, but back then the ThumbPanel
derived simply from Forms.Control. I rearchitected it for several reasons,
but largely because I wanted to have the FlowLayoutPanel handle all the
layout for me, rather than having my code do a bunch of layout calculations
and deal with scrolling, etc.
But after my re-architecting to derive from FlowLayoutPanel the results are
broken. The ThumbPanel is never redrawn after I make calls on it that add
ThumbNails (images.) I set a breakpoint in ThumbPanel.OnPaint(), but it is
never called!?
The main form (in which the ThumbPanel is placed) does the following calls:
// This line assigns a new set of thumbnail images to be shown in
the ThumbPanel....
thumbPanel.AssetsSource = m_Model.CurrentDirAssets;
thumbPanel.Refresh();
After this line, I would have expected ThumbPanel.OnPaint() to be called,
but it is not.
Any recommendations how to debug this?
(I have not included code, since there it is more code than seems feasible
to include in this kind of posting.)
Thanks,
-- Bruce