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;
We will re-create builds on web site asap. Thank you for reporting!
Still having trouble with the siLangCombo component in Delphi 5.
In design mode, double-clicking used to give the property editor, but now gives the 'canvas does not allow drawing' error.
The error eventually disappears after repeated clicking of the OK button and then gives the property editor.
I have repeated this behaviour occur using a blank form containing only a siLangDispatcher component and a siLangCombo component.
Please use temporary workaround: former TComboBox instead of TsiLangCombo before support come back in a week. At least you will be able to switch language in run-time :)
I have now downloaded the updated version.
Still gives the same effect:
On double-clicking the siComboBox during design-time, it gives the 'canvas does not allow drawing' error. After clicking the ok button of the error message a number of times, the language settings box finally appears.
Updated builds will be available for download during next days. Meantime you can fix this manually on your side:
1. Open _siComboPropEd.pas unit
2. Modify procedure TfrmSiLangComboEditor.cbFlagsMeasureItem as following: