Comments (5)
@ZhuYonglin 这个消息框是仿系统向的,追求的是一种正规的感觉,所以没有提供视觉元素方面的修改接口。要修改的话只能从源码着手,文本是在这里绘制的:
https://github.com/ahdung/MessageBoxEx/blob/163620a0716644bd118afdff503b084bbc251d74/MsgBox.cs#L674
from msgbox.
static readonly Font GlobalFont = SystemFonts.MessageBoxFont;
我找到了一个全局的字体,修改后有效过,但是下方panel高度有问题,上方的标题大小也有问题
from msgbox.
@ZhuYonglin 因为GlobalFont
用在多个地方,牵连较大,所以如果你只想改消息区,还只能在 TextRenderer.DrawText
处指定特别字体,另外,颜色也可以在这里改。
至于标题栏字体,由于这是标准的Windows窗体,标题边框等元素由系统控制,并不是自绘的,所以改不了~或者说只能改系统主题。
from msgbox.
@ahdung 能告知下如何改个提示窗大小,和下方panel区域大小的代码段在哪吗? 3Q
from msgbox.
@ZhuYonglin 这些是根据内容自动确定的,如果你想手动,可以在MessageForm的构造里改ClientSize,这控制的是整个消息窗体的尺寸,至于按钮区的尺寸,可在CreateButtonsPanel中找找。
from msgbox.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msgbox.