* some fixes

git-svn-id: https://svn.code.sf.net/p/kolmck/code@141 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07
This commit is contained in:
dkolmck
2014-12-03 10:58:03 +00:00
parent 70dda1a9a1
commit e37802a4d5

View File

@@ -193,7 +193,7 @@ type
procedure ComboBox_CloseUp(Sender: PObj); procedure ComboBox_CloseUp(Sender: PObj);
public public
fInPlaceEd: PControl; fInPlaceEd: PControl;
bComboEditor: Boolean; IsComboEditor: Boolean;
ComboOptions: TComboOptions; ComboOptions: TComboOptions;
ComboText: KOLString; ComboText: KOLString;
destructor Destroy; virtual; // Do not call this destructor. Use Free method instead. destructor Destroy; virtual; // Do not call this destructor. Use Free method instead.
@@ -609,9 +609,9 @@ begin
S := fOwner.LVItems[LVCurItem, fCurIdx]; S := fOwner.LVItems[LVCurItem, fCurIdx];
if Assigned(fOnGetText) then if Assigned(fOnGetText) then
fOnGetText(fOwner, fCurIdx, LVCurItem, S); fOnGetText(fOwner, fCurIdx, LVCurItem, S);
if bComboEditor then begin if IsComboEditor then begin
IsComboEditor := False; //
fInPlaceEd.CurIndex := fInPlaceEd.IndexOf(S); fInPlaceEd.CurIndex := fInPlaceEd.IndexOf(S);
bComboEditor := False; //
//fInPlaceEd.DroppedDown := True; //fInPlaceEd.DroppedDown := True;
end else begin //if fEmbedEd then begin end else begin //if fEmbedEd then begin
if (fInPlaceEd.SubClassName = 'obj_COMBOBOX') then if (fInPlaceEd.SubClassName = 'obj_COMBOBOX') then
@@ -710,12 +710,12 @@ begin
if not RO then begin if not RO then begin
fEmbedEd := not Assigned(Result); fEmbedEd := not Assigned(Result);
if fEmbedEd then begin if fEmbedEd then begin
if bComboEditor then begin if IsComboEditor then begin
Result := NewCombobox(fOwner, ComboOptions); Result := NewCombobox(fOwner, ComboOptions);
Result.OnCloseUp := ComboBox_CloseUp; Result.OnCloseUp := ComboBox_CloseUp;
repeat repeat
Result.Add(Parse(ComboText, ';')); Result.Add(Parse(ComboText, ';'));
until (Length(ComboText) = 0); until (ComboText = '');
end else end else
Result := NewEditBox(fOwner, Options); Result := NewEditBox(fOwner, Options);
Result.Font.Assign(fOwner.Font); Result.Font.Assign(fOwner.Font);
@@ -754,7 +754,7 @@ begin
P := LVItemPos[i]; P := LVItemPos[i];
if (i = 0) then begin if (i = 0) then begin
R.Right := R.Left + LVColWidth[0]; R.Right := R.Left + LVColWidth[0];
fShift := P.X - R.Left + 2; fShift := P.X - R.Left + 1; // dufa. 9.05.13, ������ ���� 2. � 1 ����� ListView + LVSCW_AUTOSIZE �������� ��� ����;
end; end;
if (Perform(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) and LVS_EX_GRIDLINES) <> 0 then begin if (Perform(LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) and LVS_EX_GRIDLINES) <> 0 then begin
Inc(R.Left); Inc(R.Left);