Repaint Issue with AdvPanel on AdvPageControl in C++ Builder 10.4.2

Hello,

I recently upgraded from C++ Builder 10.2 to 10.4.

To repeat... If I create a new VCL Forms Application project in 10.2 and the same in 10.4 Then on both projects I place a AdvPageControl the form. Add a new sheet. Then place a AdvPanel on the sheet and set the Align property to alClient then place a AdvComboBox on the sheet.

Here is the code behind OnDropDown
{
AdvComboBox1->Width = 200;
AdvComboBox1->Font->Name = "Courier New";
AdvComboBox1->Items->Clear();
AdvComboBox1->Items->Add("A - Alpha");
AdvComboBox1->Items->Add("B - Bravo");
AdvComboBox1->Items->Add("C - Cat");
}

Here is the code behind the OnCloseUp
{
wchar_t temp_display[11];
memset(temp_display,0,sizeof(temp_display));
wcsncpy(temp_display,AdvComboBox1->Items->Strings[AdvComboBox1->ItemIndex].c_str(),1);
AdvComboBox1->Items->Add(temp_display);
AdvComboBox1->ItemIndex = AdvComboBox1->Items->Count-1;
AdvComboBox1->Font->Name = "Tahoma";
AdvComboBox1->Width = 37;
}

When I run the application, in 10.4 and when I close up the AdvComboBox the screen does a repaint. In 10.2 if I perform the same action it does not.

The problem is my application repaints each time I close up a AdvComboBox and this creates a flickering effect.

I have the two sample projects I can provide if needed.

Thank you for any help,
Chad

I could not reproduce here that the screen repaints.

  1. maybe this is VCL themes related if you enabled these?
  2. did you compare this with a regular TComboBox as I cannot see how our TAdvComboBox would be different from a standard VCL combobox?
  3. You might try to play with the components DoubleBuffered settings to avoid unwanted repaints

Hello Bruno,

Thank you for the reply.

  • I am not aware of VCL Themes. Do not know how they are set or what they do.

  • I placed a TComboBox right next to the TAdvComboBox and put the same code behind the DropDown event and the CloseUp event. When I run the application the TComboBox does not cause a repaint but the AdvComboBox does.

  • Did you place my code snippets in the corresponding events? The blink only happens with the code behind the events.

  • I looked through each component and the main form and have set to true each double buffered option I could find. When I set the double buffered option to false on the AdvPanel the blink goes away. Not sure what double buffered does? Is there a risk if I leave it false?

Thank you,
Chad

http://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.Controls.TWinControl.DoubleBuffered