#pas
procedure THIComboBox.Init;
var Flags:TComboOptions;
dt:TData; //***
begin
Flags := [{coNoIntegralHeight}];
dtString(dt, _prop_Text); //***
if (_prop_ReadOnly = 0) then include(Flags,coReadOnly);
if _prop_Sort then include(Flags,coSort);
if ManFlags and $8 > 0 then include(Flags,coOwnerDrawFixed);
Control := NewCombobox(FParent,Flags);
Control.OnMeasureItem:= _OnMeasureItem;
inherited;
SetStrings(_prop_Strings);
with Control{$ifndef F_P}^{$endif} do
begin
if (_prop_ReadOnly <> 0) then OnChange := _OnChange;
Text := _prop_Text;
OnSelChange := _OnClick;
if ManFlags and $8 > 0 then OnDrawItem := _OnDrawItem;
//if (Count > 0) and (_prop_ReadOnly = 0) then CurIndex := 0;
if (Count > 0) and (_prop_ReadOnly = 0) then _work_doSelectString(dt,0);//***
end;
end;
Ответов: 5227
Рейтинг: 587
|
|||
у себя так и сделал костылём, меня устроит.
|
|||
карма: 4 |
|