社区
C#
帖子详情
请问为什么toolbar图标下的字体显示不出来?
FreeIn2006
2006-05-12 10:03:11
在TOOLBAR上加了几个按钮(有图标的),想在图标按钮下显示字体,但显示不出来,为什么?
...全文
171
8
打赏
收藏
请问为什么toolbar图标下的字体显示不出来?
在TOOLBAR上加了几个按钮(有图标的),想在图标按钮下显示字体,但显示不出来,为什么?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
FreeIn2006
2006-05-12
打赏
举报
回复
找到原因了。原来是窗体的.resx文件的问题。改变TOOLBAR后.resx文件不会自动跟着改-_-!!!
谢谢
FreeIn2006
2006-05-12
打赏
举报
回复
试过的,但就是不行。不知道为什么。。
lovvver
2006-05-12
打赏
举报
回复
你可以新建一个窗体,然后用该代码覆盖对应代码即可。
只需要改动一下namespace。
lovvver
2006-05-12
打赏
举报
回复
什么都不用的,等一下,我给你一个例子。
using System;
using System.Windows.Forms;
namespace ToolbarText
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ToolBar toolBar2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.ComponentModel.IContainer components;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.panel1 = new System.Windows.Forms.Panel();
this.toolBar2 = new System.Windows.Forms.ToolBar();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2});
this.toolBar1.DropDownArrows = true;
this.toolBar1.ImageList = this.imageList1;
this.toolBar1.Location = new System.Drawing.Point(0, 0);
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(576, 41);
this.toolBar1.TabIndex = 0;
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// toolBarButton1
//
this.toolBarButton1.ImageIndex = 1;
this.toolBarButton1.Text = "邮件";
//
// toolBarButton2
//
this.toolBarButton2.ImageIndex = 0;
this.toolBarButton2.Text = "删除";
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Ivory;
this.panel1.Controls.Add(this.toolBar2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 41);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(576, 47);
this.panel1.TabIndex = 1;
//
// toolBar2
//
this.toolBar2.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.toolBar2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolBar2.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton3,
this.toolBarButton4});
this.toolBar2.DropDownArrows = true;
this.toolBar2.ImageList = this.imageList1;
this.toolBar2.Location = new System.Drawing.Point(0, 0);
this.toolBar2.Name = "toolBar2";
this.toolBar2.ShowToolTips = true;
this.toolBar2.Size = new System.Drawing.Size(576, 42);
this.toolBar2.TabIndex = 0;
//
// toolBarButton3
//
this.toolBarButton3.ImageIndex = 1;
this.toolBarButton3.Text = "邮件";
//
// toolBarButton4
//
this.toolBarButton4.ImageIndex = 0;
this.toolBarButton4.Text = "删除";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(576, 294);
this.Controls.Add(this.panel1);
this.Controls.Add(this.toolBar1);
this.Name = "Form1";
this.Text = "Form1";
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}
FreeIn2006
2006-05-12
打赏
举报
回复
应该不用设置什么的吧。也找不到什么该设置的。
FreeIn2006
2006-05-12
打赏
举报
回复
有写TEXT的。我改过图标,但运行时却还是原来的,好像不会自动刷新。重新编译也不行。
lovvver
2006-05-12
打赏
举报
回复
怎么会?楼主搞错了吧
每个按钮的Text是什么?有吗?
FreeIn2006
2006-05-12
打赏
举报
回复
还有就是TOOLBAR好像有BUG。。。。。。
pb
toolbar
设置
字体
pb
toolbar
设置
字体
pb
toolbar
设置
字体
pb
toolbar
设置
字体
pb源码更改自带
toolbar
的
字体
pb源码,pb本身的
toolbar
图标
小,不能
显示
文字,本例可以更改
toolbar
字体
和
显示
文字
toolbar
:使用css精灵、before after伪类和
图标
字体
创建固定的提示按钮和置顶按钮
toolbar
使用css精灵、before after伪类和
图标
字体
创建固定的提示按钮和置顶按钮
Toolbar
.js-实用的tooltip样式jQuery工具栏插件
Toolbar
.js是一款非常实用的Tooltips样式的jQuery工具栏插件。该工具栏插件使用简单,可以和Font Awesome
字体
图标
配合使用,并且可以制作非常酷的工具栏弹出动画效果。
Qt
ToolBar
工具栏里同时
显示
图标
和文字
设置Q
ToolBar
中toolButtonStyle的属性,ToolButtonIconOnly改为ToolButtonTextUnderIcon文字就在
图标
下面
显示
C#
110,539
社区成员
642,577
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章