heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
39 stars 16 forks source link

TabControl slows other controls and causes flickering #2607

Open HeuristicLab-Trac-Bot opened 8 years ago

HeuristicLab-Trac-Bot commented 8 years ago

Issue migrated from trac ticket # 2607

milestone: HeuristicLab 3.3.x Backlog | component: MainForm.WindowsForms | priority: medium

2016-05-12 15:02:05: @NimZwei created the issue


Controls on a TabControl resize slowly and flicker, as also reported on varios stack overflow articles (see below). In cases where calculation intensive resizing is involved (e.g. charts), the GUI freezes shortly due to resizing and flickers.

Most articles suggest setting the WS_EX_COMPOSITED flag on the TabControl:

protected override CreateParams CreateParams {
  get {
    CreateParams cp = base.CreateParams;
    cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED
    return cp;
  }
}

Some authors warn of possible side effects of this flag, so this should be properly tested.

http://stackoverflow.com/questions/4690426/why-do-my-winforms-controls-flicker-and-resize-slowly http://stackoverflow.com/questions/3111841/tabcontrol-blinks-if-image-is-background http://stackoverflow.com/questions/2612487/how-to-fix-the-flickering-in-user-controls?lq=1 http://stackoverflow.com/questions/16925369/tabcontrol-flickering

HeuristicLab-Trac-Bot commented 8 years ago

2016-05-12 15:03:21: @NimZwei uploaded file Enable WS_EX_COMPOSITED on DragOverTabControl.patch (0.5 KiB)

HeuristicLab-Trac-Bot commented 8 years ago

2016-07-08 15:55:10: @NimZwei changed milestone from HeuristicLab 3.3.14 to HeuristicLab 3.3.x Backlog

HeuristicLab-Trac-Bot commented 5 years ago

2019-01-04 19:29:37: @gkronber changed status from new to assigned

HeuristicLab-Trac-Bot commented 5 years ago

2019-01-04 19:29:37: @gkronber set owner to @gkronber

HeuristicLab-Trac-Bot commented 5 years ago

2019-01-04 19:29:37: @gkronber commented


I quickly tested the patch to check whether this has an effect on the extreme lag of enabling / disabling of controls but found no noticeable improvement. It might still have a positive effect on resizing though. I have not tested this.

HeuristicLab-Trac-Bot commented 5 years ago

2019-01-04 19:29:37: @gkronber