Error[8]: Undefined offset: 2, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrid中保留InPlaceEditor的高亮? 我当前的StringGrid选项是: 如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示. 我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有 当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrID中保留InPlaceEditor的高亮?

我当前的StringGrID选项是:

如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示.

我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有什么警告吗?

procedure TForm1.sgMultIDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGrIDDrawState);      begin    if (ACol = sgMulti.Col) and (ARow = sgMulti.Row) then    begin      sgMulti.Canvas.Brush.color := clYellow;      sgMulti.Canvas.FillRect(Rect);        sgMulti.Canvas.TextRect(Rect,Rect.left,Rect.top,sgMulti.Cells[ACol,ARow]);       if gdFocused in State then        sgMulti.Canvas.DrawFocusRect(Rect); user    end;  end; { sgMultIDrawCell}

编辑:下面的屏幕截图阐明了它今天的表现.我想当前的细胞,当失去焦点时,比底部屏幕捕获更清晰

解决方法 如果要保持启用goAlwaysShowEditor选项并仅突出显示始终显示的编辑器,则需要访问InplaceEditor属性.这需要子类化您的字符串网格类并更改inplace编辑器的颜色,默认情况下是TCustomMaskEdit控件类.在此代码中显示了如何更改inplace编辑器的颜色,具体取决于字符串网格何时聚焦:

type  TStringGrID = class(GrIDs.TStringGrID)  private    procedure cmenter(var Message: Tcmenter); message CM_ENTER;    procedure cmexit(var Message: Tcmexit); message CM_EXIT;  protected    function CreateEditor: TInplaceEdit; overrIDe;  end;implementation{ TStringGrID }procedure TStringGrID.cmenter(var Message: Tcmenter);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := [+++]00FFBF;end;procedure TStringGrID.cmexit(var Message: Tcmexit);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := [+++]00A6FF;end;function TStringGrID.CreateEditor: TInplaceEdit;begin  Result := inherited;  if Focused then    TMaskEdit(Result).color := [+++]00FFBF  else    TMaskEdit(Result).color := [+++]00A6FF;end;

聚焦和未聚焦网格状态的结果:

总结

以上是内存溢出为你收集整理的delphi – 在失去焦点时保持InPlaceEditor高亮显示全部内容,希望文章能够帮你解决delphi – 在失去焦点时保持InPlaceEditor高亮显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 3, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrid中保留InPlaceEditor的高亮? 我当前的StringGrid选项是: 如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示. 我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有 当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrID中保留InPlaceEditor的高亮?

我当前的StringGrID选项是:

如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示.

我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有什么警告吗?

procedure TForm1.sgMultIDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGrIDDrawState);      begin    if (ACol = sgMulti.Col) and (ARow = sgMulti.Row) then    begin      sgMulti.Canvas.Brush.color := clYellow;      sgMulti.Canvas.FillRect(Rect);        sgMulti.Canvas.TextRect(Rect,Rect.left,Rect.top,sgMulti.Cells[ACol,ARow]);       if gdFocused in State then        sgMulti.Canvas.DrawFocusRect(Rect); user    end;  end; { sgMultIDrawCell}

编辑:下面的屏幕截图阐明了它今天的表现.我想当前的细胞,当失去焦点时,比底部屏幕捕获更清晰

解决方法 如果要保持启用goAlwaysShowEditor选项并仅突出显示始终显示的编辑器,则需要访问InplaceEditor属性.这需要子类化您的字符串网格类并更改inplace编辑器的颜色,默认情况下是TCustomMaskEdit控件类.在此代码中显示了如何更改inplace编辑器的颜色,具体取决于字符串网格何时聚焦:

type  TStringGrID = class(GrIDs.TStringGrID)  private    procedure cmenter(var Message: Tcmenter); message CM_ENTER;    procedure cmexit(var Message: Tcmexit); message CM_EXIT;  protected    function CreateEditor: TInplaceEdit; overrIDe;  end;implementation{ TStringGrID }procedure TStringGrID.cmenter(var Message: Tcmenter);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00FFBF;end;procedure TStringGrID.cmexit(var Message: Tcmexit);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := [+++]00A6FF;end;function TStringGrID.CreateEditor: TInplaceEdit;begin  Result := inherited;  if Focused then    TMaskEdit(Result).color := [+++]00FFBF  else    TMaskEdit(Result).color := [+++]00A6FF;end;

聚焦和未聚焦网格状态的结果:

总结

以上是内存溢出为你收集整理的delphi – 在失去焦点时保持InPlaceEditor高亮显示全部内容,希望文章能够帮你解决delphi – 在失去焦点时保持InPlaceEditor高亮显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 4, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrid中保留InPlaceEditor的高亮? 我当前的StringGrid选项是: 如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示. 我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有 当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrID中保留InPlaceEditor的高亮?

我当前的StringGrID选项是:

如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示.

我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有什么警告吗?

procedure TForm1.sgMultIDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGrIDDrawState);      begin    if (ACol = sgMulti.Col) and (ARow = sgMulti.Row) then    begin      sgMulti.Canvas.Brush.color := clYellow;      sgMulti.Canvas.FillRect(Rect);        sgMulti.Canvas.TextRect(Rect,Rect.left,Rect.top,sgMulti.Cells[ACol,ARow]);       if gdFocused in State then        sgMulti.Canvas.DrawFocusRect(Rect); user    end;  end; { sgMultIDrawCell}

编辑:下面的屏幕截图阐明了它今天的表现.我想当前的细胞,当失去焦点时,比底部屏幕捕获更清晰

解决方法 如果要保持启用goAlwaysShowEditor选项并仅突出显示始终显示的编辑器,则需要访问InplaceEditor属性.这需要子类化您的字符串网格类并更改inplace编辑器的颜色,默认情况下是TCustomMaskEdit控件类.在此代码中显示了如何更改inplace编辑器的颜色,具体取决于字符串网格何时聚焦:

type  TStringGrID = class(GrIDs.TStringGrID)  private    procedure cmenter(var Message: Tcmenter); message CM_ENTER;    procedure cmexit(var Message: Tcmexit); message CM_EXIT;  protected    function CreateEditor: TInplaceEdit; overrIDe;  end;implementation{ TStringGrID }procedure TStringGrID.cmenter(var Message: Tcmenter);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00FFBF;end;procedure TStringGrID.cmexit(var Message: Tcmexit);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00A6FF;end;function TStringGrID.CreateEditor: TInplaceEdit;begin  Result := inherited;  if Focused then    TMaskEdit(Result).color := [+++]00FFBF  else    TMaskEdit(Result).color := [+++]00A6FF;end;

聚焦和未聚焦网格状态的结果:

总结

以上是内存溢出为你收集整理的delphi – 在失去焦点时保持InPlaceEditor高亮显示全部内容,希望文章能够帮你解决delphi – 在失去焦点时保持InPlaceEditor高亮显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
Error[8]: Undefined offset: 5, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrid中保留InPlaceEditor的高亮? 我当前的StringGrid选项是: 如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示. 我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有 当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrID中保留InPlaceEditor的高亮?

我当前的StringGrID选项是:

如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示.

我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有什么警告吗?

procedure TForm1.sgMultIDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGrIDDrawState);      begin    if (ACol = sgMulti.Col) and (ARow = sgMulti.Row) then    begin      sgMulti.Canvas.Brush.color := clYellow;      sgMulti.Canvas.FillRect(Rect);        sgMulti.Canvas.TextRect(Rect,Rect.left,Rect.top,sgMulti.Cells[ACol,ARow]);       if gdFocused in State then        sgMulti.Canvas.DrawFocusRect(Rect); user    end;  end; { sgMultIDrawCell}

编辑:下面的屏幕截图阐明了它今天的表现.我想当前的细胞,当失去焦点时,比底部屏幕捕获更清晰

解决方法 如果要保持启用goAlwaysShowEditor选项并仅突出显示始终显示的编辑器,则需要访问InplaceEditor属性.这需要子类化您的字符串网格类并更改inplace编辑器的颜色,默认情况下是TCustomMaskEdit控件类.在此代码中显示了如何更改inplace编辑器的颜色,具体取决于字符串网格何时聚焦:

type  TStringGrID = class(GrIDs.TStringGrID)  private    procedure cmenter(var Message: Tcmenter); message CM_ENTER;    procedure cmexit(var Message: Tcmexit); message CM_EXIT;  protected    function CreateEditor: TInplaceEdit; overrIDe;  end;implementation{ TStringGrID }procedure TStringGrID.cmenter(var Message: Tcmenter);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00FFBF;end;procedure TStringGrID.cmexit(var Message: Tcmexit);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00A6FF;end;function TStringGrID.CreateEditor: TInplaceEdit;begin  Result := inherited;  if Focused then    TMaskEdit(Result).color := 00FFBF  else    TMaskEdit(Result).color := [+++]00A6FF;end;

聚焦和未聚焦网格状态的结果:

总结

以上是内存溢出为你收集整理的delphi – 在失去焦点时保持InPlaceEditor高亮显示全部内容,希望文章能够帮你解决delphi – 在失去焦点时保持InPlaceEditor高亮显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
delphi – 在失去焦点时保持InPlaceEditor高亮显示_语言综合_内存溢出

delphi – 在失去焦点时保持InPlaceEditor高亮显示

delphi – 在失去焦点时保持InPlaceEditor高亮显示,第1张

概述当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrid中保留InPlaceEditor的高亮? 我当前的StringGrid选项是: 如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示. 我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有 当网格失去焦点到另一个非模态形式时,Delphi XE2中是否有一种方法可以在StringGrID中保留InPlaceEditor的高亮?

我当前的StringGrID选项是:

如果没有,我原本希望在失去焦点后使用下面的代码来保留当前单元格的一个亮点,但是当它们不再是当前单元格时,它会有一些问题,使单元格突出显示.

我是否需要在下面的代码中添加“else”以将颜色更改回非选定单元格上的原始颜色?有什么警告吗?

procedure TForm1.sgMultIDrawCell(Sender: TObject; ACol,ARow: Integer; Rect: TRect; State: TGrIDDrawState);      begin    if (ACol = sgMulti.Col) and (ARow = sgMulti.Row) then    begin      sgMulti.Canvas.Brush.color := clYellow;      sgMulti.Canvas.FillRect(Rect);        sgMulti.Canvas.TextRect(Rect,Rect.left,Rect.top,sgMulti.Cells[ACol,ARow]);       if gdFocused in State then        sgMulti.Canvas.DrawFocusRect(Rect); user    end;  end; { sgMultIDrawCell}

编辑:下面的屏幕截图阐明了它今天的表现.我想当前的细胞,当失去焦点时,比底部屏幕捕获更清晰

解决方法 如果要保持启用goAlwaysShowEditor选项并仅突出显示始终显示的编辑器,则需要访问InplaceEditor属性.这需要子类化您的字符串网格类并更改inplace编辑器的颜色,默认情况下是TCustomMaskEdit控件类.在此代码中显示了如何更改inplace编辑器的颜色,具体取决于字符串网格何时聚焦:

type  TStringGrID = class(GrIDs.TStringGrID)  private    procedure cmenter(var Message: Tcmenter); message CM_ENTER;    procedure cmexit(var Message: Tcmexit); message CM_EXIT;  protected    function CreateEditor: TInplaceEdit; overrIDe;  end;implementation{ TStringGrID }procedure TStringGrID.cmenter(var Message: Tcmenter);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00FFBF;end;procedure TStringGrID.cmexit(var Message: Tcmexit);begin  inherited;  if Assigned(InplaceEditor) then    TMaskEdit(InplaceEditor).color := 00A6FF;end;function TStringGrID.CreateEditor: TInplaceEdit;begin  Result := inherited;  if Focused then    TMaskEdit(Result).color := 00FFBF  else    TMaskEdit(Result).color := 00A6FF;end;

聚焦和未聚焦网格状态的结果:

总结

以上是内存溢出为你收集整理的delphi – 在失去焦点时保持InPlaceEditor高亮显示全部内容,希望文章能够帮你解决delphi – 在失去焦点时保持InPlaceEditor高亮显示所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1256345.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-07
下一篇 2022-06-07

发表评论

登录后才能评论

评论列表(0条)

保存