cxRadioButton不显示焦点矩形虚线框
来源:互联网 发布:readfile java 编辑:程序博客网 时间:2024/04/28 06:29
在cxRadioGroup.pas文件中找到 procedure(存储过程)TcxRadioButton.DrawCaption,将ACanvas.Canvas.DrawFocusRect(R)注释掉就可以了。
procedure TcxRadioButton.DrawCaption(ACanvas: TcxCanvas; ANativeStyle: Boolean); function GetDrawTextFlags: Integer; begin Result := cxAlignLeft or cxAlignVCenter or cxShowPrefix; if WordWrap then Result := Result or cxDontClip or cxWordBreak else begin Result := Result or cxSingleLine; if ShowEndEllipsis then Result := Result or cxShowEndEllipsis; end; end; procedure CheckFocusRect(var R: TRect); begin if IsInplace then begin R.Top := Max(R.Top, 1); R.Bottom := Min(R.Bottom, Height - 1); R.Right := Min(R.Right, Width); end else begin R.Left := Min(R.Left, 0); R.Top := Min(R.Top, 0); R.Right := Min(R.Right, Width); R.Bottom := Min(R.Bottom, Height); if (Alignment = taLeftJustify) then R.Right := Min(ButtonRect.Left, R.Right); end; end;var AFlags: Integer; R: TRect;begin AdjustCanvasFontSettings(ACanvas); R := TextRect; ACanvas.Brush.Style := bsClear; AFlags := GetDrawTextFlags; if IsNativeBackground then ACanvas.Canvas.Refresh; ACanvas.DrawText(Caption, R, AFlags, IsDisabledTextColorAssigned or Supports(Self, IcxContainerInnerControl) or ANativeStyle or Enabled); ACanvas.Brush.Style := bsSolid; if Focused and (Caption <> '') then begin ACanvas.TextExtent(Caption, R, AFlags); InflateRect(R, 1, 1); Inc(R.Bottom); if IsInplace then CheckFocusRect(R); ACanvas.Brush.Color := Color; ACanvas.Font.Color := Font.Color; TCanvasAccess(ACanvas.Canvas).RequiredState([csFontValid]);// ACanvas.Canvas.DrawFocusRect(R); 取消(点击radiobutton)获取焦点后出现矩形虚线框 end;end;
0 0
- cxRadioButton不显示焦点矩形虚线框
- cxCheckBox不显示焦点矩形虚线框
- Android虚线不显示
- Android虚线不显示
- 多边形和虚线矩形框
- 使用Drawable定义一个虚线或虚线矩形框
- QPushButton去掉虚线框(焦点框)
- 用opencv画虚线框矩形
- 点击图片链接不显示虚线边框【源代码】
- android 画虚线不显示解决方案
- Android添加虚线时不显示
- OpenCV 虚线矩形
- android中xml虚线不显示,或者只显示实线
- DataGridView中如何让cell focus时不显示虚线框
- 显示虚线
- QPushButton去掉选中状态的虚线框(焦点框)
- QT去除控件被选中后的焦点虚线框
- QT去除控件被选中后的焦点虚线框
- HDOJ——1874 畅通工程续(Dijkstra)
- 反纠结app开发: activity之间的数据传递
- Pascal's Triangle II
- android + SQLite数据库的使用
- Javascript 操作 SharePoint media web part
- cxRadioButton不显示焦点矩形虚线框
- 乌龟棋
- CCMenuItemFont CCmenu
- Xtrabackup使用指南 InnoDB数据备份工具
- poj 2533 Longest Ordered Subsequence
- 如何使用linkedin搜索引擎
- 如何实现对UITextField ,UITextView等输入框的 字数限制
- python sgmllib.SGMLParser的学习
- 第一个OGSI程序出了此错