在python Gtk3中是否有比在Frame中创建带边框标签更简单的方法? [英] Is there a easier way of creating a bordered Label in python Gtk3 than putting it in Frame?

查看:113
本文介绍了在python Gtk3中是否有比在Frame中创建带边框标签更简单的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的意思是更简单-我可以定义一种样式或某种东西并将其应用于程序中的所有标签吗? 我有很多标签,但不想输入太多. 我听说过"Pango样式",但是可以一次将其应用于所有标签小部件吗?

By easier i mean - can i define a style or something and apply it to all labels in my program? I have a lot of labels in it and I don't want to type so much. I heard about "Pango Style" but can I apply it to all label widgets at once?

推荐答案

您可以

add_provider只需要运行一次,但是在实现一个小部件之后(无论您要添加到哪个小部件都无关紧要)

add_provider needs to be run only once but after a widget is realized (doesn't matter which widget you will add to)

这篇关于在python Gtk3中是否有比在Frame中创建带边框标签更简单的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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