控制文本框只能錄入數字
在應用程序中為了提高數據的有效性
在文本框的鍵盤按下事件中通過按鍵值(key)來控制文本框中只能輸入
procedure TForm
begin
if not (key in [
begin
ShowMessage(
key:=#
end;
end;
如何在DataGrid中嵌入LookupComboBox
在開發過程中
http://develop
圖
在DataGrid表格的DrawColumnCell事件中設置LookupComboBox組件左邊距
procedure TFrmOrderBy
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (gdFocused in State) then
begin
if (Column
begin
with DBLookupComboBox
begin
Left := Rect
Top := Rect
Width := Column
Height := Rect
Visible := True;
SetFocus;
end;
end;
end;
end;
From:http://tw.wingwit.com/Article/program/Delphi/201311/8524.html