miniui菜鸟求解答关于ComboBox,如何实现下拉列表从数据库获取

2025-03-20 06:03:18
推荐回答(1个)
回答1:

if ComboBox1.Text='宋体' then
Richedit1.SelAttributes.Name:='宋体'
else if ComboBox1.Text='微软雅黑'then
Richedit1.SelAttributes.Name:='微软雅黑'
else if ComboBox1.Text='楷体'then
Richedit1.SelAttributes.Name:='楷体'
else if ComboBox1.Text='幼圆'then
Richedit1.SelAttributes.Name:='幼圆'
else if ComboBox1.Text='喵呜体'then
Richedit1.SelAttributes.Name:='喵呜体'
else if ComboBox1.Text='黑体'then
Richedit1.SelAttributes.Name:='黑体'
else
Richedit1.SelAttributes.Name:='宋体'

combobox1.text获取前选择值 我段代码做类似于WORD程序设置字体用参照

另外拉框值combobox属性items设置