开发者

Gtk+ Tables for Layout - Good or Bad?

I'm just starting to play around with GTK+ and I wanted to stop bad habits before they happen. I see that GTK+ seems to be a little based in HTML/CSS and I was wondering if there are any reasons to avoid using tables for layout.开发者_开发问答


The widget structure should reflect the logical structure to help screen readers correctly present the window (sorry - I don't remember the name but it is standard GNOME tool).

If the logical structure is of table form then sure - use it. However if other would reflect them better - use them.

PS. Similarly to HTML where <table> should reflect the tabular data (not necessary so much in GTK+ but still) and should not be used only for layout.


GTK+ is not based on HTML nor CSS, but (lib)Glade and gtkbuilder does use an XML based file format for storing user interfaces. GTK+ is a software library and application programming interface -- it is not a scripting nor layout language.

If you want to avoid bad habits, read the GNOME Human Interface Guidelines, the Windows Human Interface Guidelines or the equivalent for the user interface you are targeting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜