Subject Re: [IBO] Odd display problem in Vista, IB_ComboBox, on IB_Grid
Author Adrian Wreyford
Thanks Andreas.

I unticked enable runtime themes in Project .. Options .. Forms, and then the IB_ComboBoxes drop down in the correct place, but don't stay down to allow you to select, but return up immediately. They also appear differently, than when Runtime themes are enabled.
When I recreate the entire form from scratch, the IB_Comboboxes work as expected.

I cannot recreate my entire projects forms! There must be another way.

Thanks so far

Adrian

----- Original Message -----
From: Andreas Hesse
To: Adrian Wreyford
Cc: IBObjects@yahoogroups.com
Sent: Wednesday, January 28, 2009 9:55 PM
Subject: Re: [IBO] Odd display problem in Vista, IB_ComboBox, on IB_Grid


Adrian Wreyford schrieb:
> Hi, Andreas, could you advise how I turn off theming for the control, so I can see if this helps?
>
> Regards
> Adrian
>
>
> Last time I saw this I turned off theming for this control only.
> And then it work, but I don't know why.
>
> Andreas
>
> .
>

I override CreateWindowHandle (in a child TIB_ComboBox):

procedure TIB_ComboBoxEx.CreateWindowHandle(const Params: TCreateParams);
begin
inherited;
if not FFlag then
try
FFlag := true;
if ThemeServices.ThemesEnabled and IsWinVista and (Parent is
TIB_CustomGrid) then
SetWindowTheme(Handle, ' ', ' ');
finally
FFlag := false;
end;
end;

IsWinVista is a function of Jcl.

Hope it helps.

Andreas





[Non-text portions of this message have been removed]