parent
25665746f6
commit
09011c68d7
|
|
@ -2919,7 +2919,7 @@ type TGridCtl = class(TcustomGridCtl)
|
||||||
begin
|
begin
|
||||||
return array("name","height","width","left","top","border","anchors","align","font","color","parentcolor","parentfont",
|
return array("name","height","width","left","top","border","anchors","align","font","color","parentcolor","parentfont",
|
||||||
"autoscroll","columncount","itemcount",
|
"autoscroll","columncount","itemcount",
|
||||||
"itemheight","mousesizecell","fixedrows","fixedcolumns","mergeinfo",
|
"itemheight","variablerows","mousesizecell","fixedrows","fixedcolumns","mergeinfo",
|
||||||
"ondrawcell","onhitcellsizer","onmousewheel","onmousemove",
|
"ondrawcell","onhitcellsizer","onmousewheel","onmousemove",
|
||||||
"onmousedown","onmouseup","ondblclick",
|
"onmousedown","onmouseup","ondblclick",
|
||||||
"onkeyup","onkeydown","onkeypress","onnotification");
|
"onkeyup","onkeydown","onkeypress","onnotification");
|
||||||
|
|
|
||||||
|
|
@ -754,16 +754,19 @@ type TcustomGridCtl = class(tcustomscrollcontrol) //
|
||||||
inherited;
|
inherited;
|
||||||
end
|
end
|
||||||
//*******************
|
//*******************
|
||||||
|
published
|
||||||
property ItemCount:integer read GetItemCount write SetItemCount;
|
property ItemCount:integer read GetItemCount write SetItemCount;
|
||||||
property ItemHeight:integer read FRowHeight write SetRowHeigt;
|
property ItemHeight:integer read FRowHeight write SetRowHeigt;
|
||||||
property MouseSizeCell:bool read FMouseSizeColumnWidth write setmousesizetype;
|
property MouseSizeCell:tsl read FMouseSizeColumnWidth write setmousesizetype;
|
||||||
property FixedRows:integer read FFixedRows write SetFixedRows;
|
property FixedRows:integer read FFixedRows write SetFixedRows;
|
||||||
property FixedColumns:integer read FColumFixed write SetFixedColumns;
|
property FixedColumns:integer read FColumFixed write SetFixedColumns;
|
||||||
property ColumnCount:integer read GetColumnCount write setcolumncount;
|
property ColumnCount:integer read GetColumnCount write setcolumncount;
|
||||||
property VariableRows read FVariableRows write SetVariableRows;
|
property VariableRows:bool read FVariableRows write SetVariableRows;
|
||||||
property ondrawcell:eventhandler read Fondrawcell write Fondrawcell;
|
property ondrawcell:eventhandler read Fondrawcell write Fondrawcell;
|
||||||
property onhitcellsizer:eventhandler read fonhitcellsizer write fonhitcellsizer;
|
property onhitcellsizer:eventhandler read fonhitcellsizer write fonhitcellsizer;
|
||||||
property mergeinfo:tsl read GetMergeInfo write setmergeinfo;
|
property mergeinfo:tsl read GetMergeInfo write setmergeinfo;
|
||||||
|
property ColumnWidth read GetColumnWidth write SetColumnWidth;
|
||||||
|
property rowheight read GetRowHeight write UpDateRowWidth;
|
||||||
{**
|
{**
|
||||||
@param(ItemCount)(integer) 行数 %%
|
@param(ItemCount)(integer) 行数 %%
|
||||||
@param(ColumnCount)(integer) 列数 %%
|
@param(ColumnCount)(integer) 列数 %%
|
||||||
|
|
@ -774,6 +777,8 @@ type TcustomGridCtl = class(tcustomscrollcontrol) //
|
||||||
@param(mergeinfo)(array) 合并信息,二维数组,每行为一个合并信息array(开始行,开始列,截止行,截止列) %%
|
@param(mergeinfo)(array) 合并信息,二维数组,每行为一个合并信息array(开始行,开始列,截止行,截止列) %%
|
||||||
@param(onhitcellsizer)(function[o,e]) 鼠标移动到边线时候回调,e.wparam 1,2 表示行列,e.lparam 代表对于序号,e.skip是的值作为返回表示是否忽略调整大小 %%
|
@param(onhitcellsizer)(function[o,e]) 鼠标移动到边线时候回调,e.wparam 1,2 表示行列,e.lparam 代表对于序号,e.skip是的值作为返回表示是否忽略调整大小 %%
|
||||||
@param(ondrawcell)(function[o,e]) 绘制回调,e.row 行号,e.col 列号,e.rec 绘制区域,e.canvas 绘画对象 %%
|
@param(ondrawcell)(function[o,e]) 绘制回调,e.row 行号,e.col 列号,e.rec 绘制区域,e.canvas 绘画对象 %%
|
||||||
|
@param(ColumnWidth)(integer) 通过索引号获取设置列宽 %%
|
||||||
|
@param(rowheight)(integer) 通过索引号获取设置行高,在可变高度下有用 %%
|
||||||
**}
|
**}
|
||||||
private
|
private
|
||||||
function setmergeinfo(rcs);
|
function setmergeinfo(rcs);
|
||||||
|
|
@ -1017,7 +1022,7 @@ type TcustomGridCtl = class(tcustomscrollcontrol) //
|
||||||
end
|
end
|
||||||
function UpDateRowWidth(idx,value);
|
function UpDateRowWidth(idx,value);
|
||||||
begin
|
begin
|
||||||
if FVariableRows and idx >= 0 and value>0 then
|
if FVariableRows and idx >= 0 and value>=0 then
|
||||||
begin
|
begin
|
||||||
if FRowsHeight[idx]=value then return;
|
if FRowsHeight[idx]=value then return;
|
||||||
FRowsHeight[idx]:= value;
|
FRowsHeight[idx]:= value;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ type tcustomtabsheet = class(TCustomControl) //
|
||||||
end
|
end
|
||||||
type tcustompagecontrol = class(TCustomControl)
|
type tcustompagecontrol = class(TCustomControl)
|
||||||
private
|
private
|
||||||
|
fclocker;//锁
|
||||||
FirstViewIndex; //第一个展示的序号
|
FirstViewIndex; //第一个展示的序号
|
||||||
FCurrentid; //当前
|
FCurrentid; //当前
|
||||||
FPrevid; //上一个
|
FPrevid; //上一个
|
||||||
|
|
@ -56,6 +57,16 @@ type tcustompagecontrol = class(TCustomControl)
|
||||||
fnextrect;
|
fnextrect;
|
||||||
FTabRects;
|
FTabRects;
|
||||||
FClientarea;
|
FClientarea;
|
||||||
|
private
|
||||||
|
function gettabesheet(idx);
|
||||||
|
begin
|
||||||
|
if idx>=0 then return FTabItems[idx];
|
||||||
|
end
|
||||||
|
function getactivetabsheet();
|
||||||
|
begin
|
||||||
|
id := FCurrentid;
|
||||||
|
if id>=0 then return FTabItems[id];
|
||||||
|
end
|
||||||
function SetTabPosition(v);
|
function SetTabPosition(v);
|
||||||
begin
|
begin
|
||||||
if FTabPosition=v then exit;
|
if FTabPosition=v then exit;
|
||||||
|
|
@ -232,6 +243,8 @@ type tcustompagecontrol = class(TCustomControl)
|
||||||
function setselidx(id); //选择序号
|
function setselidx(id); //选择序号
|
||||||
begin
|
begin
|
||||||
if FCurrentid= id then return ;
|
if FCurrentid= id then return ;
|
||||||
|
if fclocker.locked then return ;
|
||||||
|
lk := new tcountlocker(fclocker);
|
||||||
if id>=0 and id<FTabItems.length() then
|
if id>=0 and id<FTabItems.length() then
|
||||||
begin
|
begin
|
||||||
if FCurrentid<>-1 and fOnSelChanging then
|
if FCurrentid<>-1 and fOnSelChanging then
|
||||||
|
|
@ -415,6 +428,7 @@ type tcustompagecontrol = class(TCustomControl)
|
||||||
function AfterConstruction();override;
|
function AfterConstruction();override;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
fclocker := new tcountkernel();
|
||||||
color := 0xffffff;
|
color := 0xffffff;
|
||||||
height := 200;
|
height := 200;
|
||||||
width := 200;
|
width := 200;
|
||||||
|
|
@ -605,16 +619,21 @@ type tcustompagecontrol = class(TCustomControl)
|
||||||
end
|
end
|
||||||
{**
|
{**
|
||||||
@param(cursel)(integer) 当前选中序号 %%
|
@param(cursel)(integer) 当前选中序号 %%
|
||||||
|
@param(activetabsheet)(tcustomtabsheet) 当前选中的页面 %%
|
||||||
|
@param(tabsheet)(tcustomtabsheet) 通过下标获得页面 %%
|
||||||
@param(TabCount)(integer) page数量 %%
|
@param(TabCount)(integer) page数量 %%
|
||||||
@param(OnSelChange)(function[tcustompagecontrol,tuieventbase]) 标签已经切换 %%
|
@param(OnSelChange)(function[tcustompagecontrol,tuieventbase]) 标签已经切换 %%
|
||||||
@param(OnSelChanging)(function[tcustompagecontrol,tuieventbase]) 标签正在切换 %%
|
@param(OnSelChanging)(function[tcustompagecontrol,tuieventbase]) 标签正在切换 %%
|
||||||
@param(Onrclcik)(function[tcustompagecontrol,tuieventbase]) 右键点击 %%
|
@param(Onrclcik)(function[tcustompagecontrol,tuieventbase]) 右键点击 %%
|
||||||
**}
|
**}
|
||||||
|
published
|
||||||
|
property activetabsheet:tcustomtabsheet read getactivetabsheet write SetCurSel;
|
||||||
property cursel:lazyinteger read FCurrentid write SetCurSel;
|
property cursel:lazyinteger read FCurrentid write SetCurSel;
|
||||||
property OnSelChanged:eventhandler read FOnSelChanged write FOnSelChanged;
|
property OnSelChanged:eventhandler read FOnSelChanged write FOnSelChanged;
|
||||||
property OnSelChanging:eventhandler read FOnSelChanging write FOnSelChanging;
|
property OnSelChanging:eventhandler read FOnSelChanging write FOnSelChanging;
|
||||||
property TabCount read GetTabCount;
|
property TabCount read GetTabCount;
|
||||||
property TabPosition:tabalign read FTabPosition write SetTabPosition;
|
property TabPosition:tabalign read FTabPosition write SetTabPosition;
|
||||||
|
property tabsheet read gettabesheet ;
|
||||||
end
|
end
|
||||||
implementation
|
implementation
|
||||||
type tcustomtabitem = class() //
|
type tcustomtabitem = class() //
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue