• 周四. 4月 25th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

在pygtk Treevi中添加新行

[db:作者]

3月 7, 2023

我在我的一个应用程序中使用gtk treeview。在

申请工作如下:
我从日志文件中提取一些数据,并将重要数据添加到splite数据库中,然后通过从数据库中提取行来在treeview中显示数据。在

现在我的问题是如何添加换行符,以便在treeview cellrenderer中添加多行。在

我尝试通过设置cellrenderer“markup”属性,然后添加“\n”,然后添加
标记。如果是“\n”,它将打印“\n”,就像它在树视图单元格中一样。如果我试图添加
标记,则会出现以下错误。在

GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag 'br' on line 1 char 18 
gtk.main() 

那么,如何向gtk treeview单元格添加多行呢?在

提前谢谢

Tags:

文件to数据标记视图数据库应用程序gtk属性错误treeviewmarkupgtkwarningcellrenderersplite1条回答网友

1楼 ·

发布于 2023-03-07 00:11:06

对于自动流动的文本,CellRendererText应该做正确的事情,如果您将wrap-width属性设置为非-1的值。在

如果自动包装还不够,而且您确实需要单独的段落,那么我认为您可能需要实现自己的CellRenderer(这不是一件小事),或者使用另一个容器,如ListBox(其中自定义小部件很容易,但这意味着要扔掉treeview代码…)。在

《在pygtk Treevi中添加新行》有59个想法
  1. Somebody essentially lend a hand to make significantly posts I might state That is the very first time I frequented your web page and up to now I surprised with the research you made to create this particular put up amazing Excellent job

  2. I just could not depart your web site prior to suggesting that I really loved the usual info an individual supply in your visitors Is gonna be back regularly to check up on new posts

  3. of course like your website but you have to check the spelling on several of your posts A number of them are rife with spelling issues and I in finding it very troublesome to inform the reality on the other hand I will certainly come back again

  4. I just could not leave your web site before suggesting that I really enjoyed the standard information a person supply to your visitors Is gonna be again steadily in order to check up on new posts

  5. For the past few days I’ve been a dedicated fan of this amazing site, they deliver superb content for their community. The site owner has real talent engaging audiences. I’m thrilled and hope they maintain their magnificent efforts.

  6. Over the last week I eagerly started following this fantastic website, they have remarkable content for their community. The site owner has a real talent for informing visitors. I’m excited and hope they maintain their splendid skills.

  7. Fantastic site Lots of helpful information here I am sending it to some friends ans additionally sharing in delicious And of course thanks for your effort

  8. Just as much as I did, I relished what you accomplished here. Your language is elegant and the drawing is enticing, yet you appear rushed to get to the next thing you should be providing. If you keep this walk safe, I’ll come back more often.

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注