I would like to set a dynamic value DropDownWidth as shown below
I'm using the code
void __fastcall TForm1::AdvSearchEdit1BeforeDropDown(TObject *Sender)
{
AdvSearchEdit1->DropDownWidth = AdvSearchEdit1->Width - AdvSearchEdit1->SearchButton->Width;
}
Everything works fine if DPI=96. However, if DPI > 96, it looks like below.
How to set DropDownWidth to be always displayed as in picture 1 regardless of DPI?