Page 1 of 1

Style property missing in TsiLangCombo 6.0

Posted: Fri Jun 24, 2005 11:59 am
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?

Posted: Fri Jun 24, 2005 12:23 pm
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.

Posted: Fri Jun 24, 2005 12:25 pm
by isiticov
But Style won't be published any case because TsiLangCombo always use OwnerDrawVariable style.

Posted: Fri Jun 24, 2005 12:30 pm
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.

Posted: Fri Jun 24, 2005 1:31 pm
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.