开发者

Flowing widgets to container size (EXACTLY like the tags on the right side of stack overflow!)

I'm trying to implement a list of tags in my GTK app (writing it with GTKmm but that detail shouldn't matter here). I've written a custom widget that sticks a button and a label into an HBox so that each tag looks pretty similar to the favorite and ignore tags shown on the right side of the main stack overflow page. Is there any container I can stick these custom widgets in so that they will "flow" to the size of the container? Keep adding more horizontal until there is no room and then start on a new "line". If not, how would you suggest I make one开发者_高级运维? Start with a Gtk::Container, manually calculate the width of each tag widget and place them manually somehow? Can I even position a widget with pixel perfect precision?


Use a Gtk::TextView and insert your widgets in the text buffer?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜