delphi 修改Hint的字体和颜色

//修改Hint的字体和颜色 
  public
    { Public declarations }
    procedure Sshowhint(var hintstr:string;var canshow:Boolean;var HintInfo:THintInfo);

procedure TForm1.FormCreate(Sender: TObject);
begin
  form1.Hint:= ‘改变提示栏‘;
  form1.ShowHint:=true;
  Application.OnShowHint:= Sshowhint;
end;

procedure TForm1.Sshowhint(var hintstr:string; var canshow: Boolean;
  var HintInfo: THintInfo);
var
  i:integer;
begin
  for i:=0 to Application.ComponentCount-1 do
    if Application.Components[i] is THintWindow then
      with THintWindow(Application.Components[i]).Canvas do
      begin
        Font.Name := ‘隶书‘;
        Font.Size := 18;
        HintInfo.HintColor := clskyblue;
      end;
end;

//完成 -> 修改任意组件提示文本的样式

来自为知笔记(Wiz)

delphi 修改Hint的字体和颜色

时间: 2024-08-26 23:33:07

delphi 修改Hint的字体和颜色的相关文章

修改提示框字体及颜色

1.实例介绍 本文使用tooltip控件的draw事件重绘,修改提示框字体及颜色.创建一个winform项目,在一窗体上添加button控件和tooltip控件. 2.实现代码 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using Syst

李洪强iOS开发之-修改状态栏的字体的颜色

李洪强iOS开发之-修改状态栏的字体的颜色 修改的效果: -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [_magicController.view setFrame:CGRectMake(0, 0, CFScreenW, self.view.height-120)]; if ([UIApplication sharedApplication].statusBarStyle != UIStatusBar

Android Studio 3.1.2 修改字体(font)大小(size) 及老版本修改主题、字体、颜色 参照地址

Android Studio 3.1.2  修改字体(font)大小(size) 步骤:File-Settings-Editor-Color Scheme-Color Scheme Font-Size 图片:         老版本as修改主题.字体.颜色 参照地址: https://blog.csdn.net/bangyiqing/article/details/52241746 原文地址:https://www.cnblogs.com/1502720115chenzhen/p/9063176

使用selector修改TextView中字体的颜色

selector想必大家都用过了,但是在修改字体的颜色的时候还是要细心. 我们在TextView中设置字体颜色一般使用 android:textColor="@color/red" 但是我们在使用selector动态修改字体颜色的时候要使用 [html] view plaincopy android:color="@color/red" 我遇到这个问题的时候是在TabActivity中,每个Tab在选中的时候修改为蓝色. tab_item.xml的代码如下: [ht

修改UITabBarItem的字体颜色

修改UITabBarItem下面字体的颜色,如图: [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor blackColor], UITextAttributeTextColor, nil] forState:UIControlStateNormal]; [[UITabBarItem appearance] setTitleTextAttribu

android:修改PagerTabStrip中的背景颜色,标题字体的样式、颜色和图标以及指示条的颜色

1.修改PagerTabStrip中的背景颜色 我们在布局中直接设置background属性即可: <android.support.v4.view.ViewPager android:id="@+id/pager" android:layout_width="fill_parent" android:layout_height="fill_parent" > <android.support.v4.view.PagerTabS

在iOS7中修改状态栏字体的颜色-b

状态栏的字体为黑色: UIStatusBarStyleDefault 状态栏的字体为白色: UIStatusBarStyleLightContent 一.在 info.plist  中,将 View controller-based status bar appearance  设为 NO 状态栏字体的颜色只由下面的属性设定,默认为白色: // default is UIStatusBarStyleDefault [UIApplication sharedApplication].statusB

Eclipse修改字体、颜色、编译器背景颜色等操作方法

1.eclipse 背景色设置:Window->Preferences->General->Editors->Text Editors->Backgroud colors取消System default 设置成:RGB(204,232,207). 2.字体大小设置:java 字体:菜单windows>Prefenrence>General Appearance>Colors and Fonts 在右边的菜单中选Java> Java Editor Tex

iOS修改UIButton setTitle字体颜色和调整字体位置

调整Title字体位置 [button setTitleEdgeInsets:UIEdgeInsetsMake(10, 0, 0, 0)]; 四个参数分别代表:上边界,左边界,下边界,右边界 修改UIButton setTitle字体颜色 [button addTarget:self action:@selector(clickAction) forControlEvents:UIControlEventTouchUpInside];