Free cookie consent management tool by TermsFeed Policy Generator

Opened 8 years ago

Last modified 5 years ago

#2607 assigned defect

TabControl slows other controls and causes flickering

Reported by: pfleck Owned by: gkronber
Priority: medium Milestone: HeuristicLab 3.3.x Backlog
Component: MainForm.WindowsForms Version: 3.3.13
Keywords: Cc:

Description

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

Attachments (1)

Enable WS_EX_COMPOSITED on DragOverTabControl.patch (490 bytes) - added by pfleck 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 8 years ago by pfleck

  • Milestone changed from HeuristicLab 3.3.14 to HeuristicLab 3.3.x Backlog

comment:2 Changed 5 years ago by gkronber

  • Owner set to gkronber
  • Status changed from new to assigned

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.

Last edited 5 years ago by gkronber (previous) (diff)
Note: See TracTickets for help on using tickets.