LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1058|回复: 3

gtk编程中widget size的问题

[复制链接]
发表于 2003-10-22 22:16:30 | 显示全部楼层 |阅读模式
gtk_widget_set_usize  

gtk_window_set_default_size  
有什么不同阿
还有就是gtk文档感觉太简陋了,和看头件没什么区别,有什么更详细些文档阿?
//bow
发表于 2003-10-23 09:02:34 | 显示全部楼层
装个devhelp,里面有很多东西
发表于 2003-10-23 09:04:55 | 显示全部楼层
  1. gtk_widget_set_usize ()
  2. ----------------------------------------------
  3. void gtk_widget_set_usize ([color=blue]GtkWidget[/color] *widget,
  4.                            gint width,
  5.                            gint height);
  6. ----------------------------------------------
  7.   Warning
  8.   gtk_widget_set_usize is deprecated and should not be used in newly-written code.
  9. This function is deprecated; use [color=blue]gtk_widget_set_size_request[/color]() instead.
  10. Sets the minimum size of a widget; that is, the widget's size request will
  11. be width by height. You can use this function to force a widget to be
  12. either larger or smaller than it is. The strange "usize" name dates from
  13. the early days of GTK+, and derives from X Window System terminology.
  14. In many cases, [color=blue]gtk_window_set_default_size[/color]() is a
  15. better choice for toplevel windows than this function; setting the default
  16. size will still allow users to shrink the window. Setting the usize will force
  17. them to leave the window at least as large as the usize. When dealing
  18. with window sizes, [color=blue]gtk_window_set_geometry_hints[/color]()
  19. can be a useful function as well.
  20. Note the inherent danger of setting any fixed size - themes, translations
  21. into other languages, different fonts, and user action can all change the
  22. appropriate size for a given widget. So, it's basically impossible to
  23. hardcode a size that will always be correct.
  24.   widget?: a [color=blue]GtkWidget[/color]
  25.   width? : minimum width, or -1 to unset
  26.   height?: minimum height, or -1 to unset
复制代码
发表于 2003-10-24 16:30:44 | 显示全部楼层
一个是用户定义程序运行的时候出来的框子的大小,另一个是默认的大小。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表