如何通过列表框更改文本框的字体? [英] How to change font face of a text box through a list box???

查看:63
本文介绍了如何通过列表框更改文本框的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,嗯..我已经坚持了很长一段时间了......标题说明了一切......我需要一个学校项目huehue

Hey guys, Uhm.. I've been stuck on this thing for quite some time.. The title says it all.. I need it for a school project huehue

提前感谢!

推荐答案

TextBox1 ListBox1 添加为通常,将一些项目放到列表框中,如"Arial","Courier New","Times New Roman",然后处理表格中的
加载事件:

Add the TextBox1 and ListBox1 as usually, put some items to list box such as "Arial", "Courier New", "Times New Roman", then handle the Load event of the form:

Dim b As New Binding("Font", ListBox1, "SelectedValue")
AddHandler b.Format, Sub(s, a)
                        a.Value = New Font(ListBox1.Text, ListBox1.Font.SizeInPoints)
                     End Sub
TextBox1.DataBindings.Add(b)





这篇关于如何通过列表框更改文本框的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆