bug - incorrect form redrawing while resizing

Topics related to the Krypton Navigator.

Moderators: Phil Wright, Chris Porter

bug - incorrect form redrawing while resizing

Postby romper » Sun Aug 29, 2010 5:18 pm

Form is redrawing incorrectly when resizing. I think it has something to do with kryptonSplitContainer and/or kryptonNavigator.
To replicate the bug you have to put some controls into a form (in right order, one inside another):
kryptonSplitContainer - kryptonNavigator - kryptonSplitContainer - kryptonSplitContainer - some other controls (buttons)
Set dock for each control to Fill.
romper
 
Posts: 10
Joined: Fri Dec 21, 2007 8:01 am

Re: bug - incorrect form redrawing while resizing

Postby Phil Wright » Mon Aug 30, 2010 8:59 am

That is a pretty deep layering of controls. I would not recommend that because it slows down layout and redrawing in general.
Phil Wright
Site Admin
 
Posts: 2720
Joined: Thu Apr 13, 2006 2:55 pm
Location: Melbourne, Australia

Re: bug - incorrect form redrawing while resizing

Postby upswing » Thu Feb 24, 2011 8:35 am

I had a similar problem with two nested krypton navigators Navigator 1 and navigator 2 inside the panel of a kryptonSplitContainer . Navigator 2 is inside navigator1 when the form is maximized the nested krypton navigator2 page does not display correctly. When I removed the kryptonSplitContainer the problem disappeared. So if someone runs in the same problem you may want to check if a kryptonSplitContainer may be causing the problem.

Cheers
upswing
 
Posts: 16
Joined: Wed Aug 26, 2009 11:51 pm

Re: bug - incorrect form redrawing while resizing

Postby jlalande » Tue Mar 01, 2011 4:35 am

Hi.

We've got the same kind of problem. We have in our application some deep layering of controls. We don't want to change it because it follows a hierarchical logic. I definitely thinks Krypton should be able to handle it right, even if it might be slow. We made lots of testing but unfortunately we were not able to pinpoint the exact problem (in our full blown application I mean).

Essentially, the problem occurs in two situations : if you resize the window and if you get it down on the task bar (and restore it back after). It is very annoying for the user because the screen becomes unreadable. One has to close the tabs and open them back. In our tests, we noticed that, for the same controls combination, if the controls were added dynamically it would not work, whereas if the controls were added at design time (with the designer) it would resize nice. But we could not really see what was different between the two codes, and our application needs to build some parts of the interface at run-time.

We have come across this thread last week and found out that the proposed fix could help :
http://componentfactory.stage.riverwillow.com.au/forums/viewtopic.php?f=3&t=3194

Code: Select all
protected override void OnSizeChanged(EventArgs e)
{
      scReviewMain.SuspendLayout();

      base.OnSizeChanged(e);

      scReviewMain.ResumeLayout();
}


It seems to work although we're not sure if it is the right way to go and we would prefer not to have to put that fix everywhere in the controls where we see the bug.

Phil, we have made a small repro code so you can try and fix the bug. Note that it occurs only on Win7 64 bit. We have no problems on Win7 32 bit or Win XP (tested on 32bit, not 64).

I will let you look into the issue. I hope you can find a fix soon! Please keep me informed about it.

Best regards!
J. Lalande
Attachments
KryptonNavigatorProblem.zip
Repro solution - for win7 64bit
(23.75 KiB) Downloaded 16 times
jlalande
 
Posts: 1
Joined: Sat Feb 26, 2011 1:54 am

Re: bug - incorrect form redrawing while resizing

Postby quimbo » Tue May 08, 2012 7:29 am

Thank you for the work-around, this was becoming a major annoyance.
quimbo
 
Posts: 169
Joined: Sat Sep 08, 2007 3:38 am


Return to Krypton Navigator

Who is online

Users browsing this forum: No registered users and 4 guests