Style property missing in TsiLangCombo 6.0

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
MainSoft
Posts: 52
Joined: Mon Feb 14, 2005 9:18 am
Contact:

Style property missing in TsiLangCombo 6.0

Post by MainSoft »

Hi,

It seems that the Style property has not been published in TsiLangCombo 6.0.

So the DropDownCount property has become useless and I'm limited to a single line display of the language items. This is not what I want: I want all languages to be visible (within the limits set by DropDownCount).

Did I miss something?
Patrick Philippot
www.mainsoft.fr
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hi,
Please either download latest version from our web site (it was updated at 20 June 2005 and contains a fix for drop-down problem) or modify sources of TsiLangCombo as following:

Code: Select all

procedure TsiLangCombo.MeasureItem(Index: Integer; var Height: Integer);
var
{$IFNDEF DELPHI6}
   CC: TControlCanvas;
{$ENDIF}   
   I: Integer;
begin
  if Assigned(OnMeasureItem) then      
    OnMeasureItem(Self, Index, Height)
  else
  begin
{$IFNDEF DELPHI6}
    I := Height;
    CC := TControlCanvas.Create;
    try
      CC.Control := Self;
      if CC.Handle <> 0 then
        I := CC.TextHeight('H') + 3;
    finally
      CC.Free;
    end;
{$ELSE}
    I := Canvas.TextHeight('H') + 3;
{$ENDIF}
    if I > Height then
      Height := I;
  end;
end;
Please let me know if this helps.
Best regards,
Igor Siticov.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

But Style won't be published any case because TsiLangCombo always use OwnerDrawVariable style.
Best regards,
Igor Siticov.
MainSoft
Posts: 52
Joined: Mon Feb 14, 2005 9:18 am
Contact:

Post by MainSoft »

isiticov wrote:But Style won't be published any case because TsiLangCombo always use OwnerDrawVariable style.
That's what I call a quick :) reply . Thanks.
Patrick Philippot
www.mainsoft.fr
MainSoft
Posts: 52
Joined: Mon Feb 14, 2005 9:18 am
Contact:

Post by MainSoft »

isiticov wrote:But Style won't be published any case because TsiLangCombo always use OwnerDrawVariable style.
The new version fixed the problem. Thanks.
Patrick Philippot
www.mainsoft.fr
Post Reply