PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

GtkAdjustment Constructor | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

GtkAdjustment Constructor

GtkAdjustment (double value, double lower, double upper, double step_increment, double page_increment, double page_size);

Not every widget with an underlying adjustment object uses all six of the properties available. Where this occurs, null is not a valid parameter option; all the adjustment parameters take double values, and you will need to set them as 0.0 where they are not needed.

The first parameter, value, is used by every widget with an adjustable part. It represents the current value, and should be set to the value that you want to see displayed on opening. That setting will most often be 0.0 for percentage-based values (e.g. in a GtkProgressBar or in a GtkScrollbar), or 1.0 for literal values (e.g. in a GtkSpinButton).

lower and upper are the next two parameters. These represent the limitations on the changing value; what is the lowest possible value, and what is the highest? Very often, the opening value is at the start of the rising scale, and will in that case be equal in value to the lower parameter setting. The way you choose to express the upper bound may depend on the step_increment, which is defined in the fourth parameter when it is used at all. For instance, you could set the upper bound at 100.0 and increment the value in steps of 1.0, or set it at 1.0 and increment the value in steps of 0.01, depending on what it is you are measuring or on your mood. Either goes the same distance.

The final two parameters are page_increment and page_size. Where these are used, the page_increment should have roughly 90% of the page_size value. If you set the page size to the same value as the upper bound, a GtkScrollbar using these values will be extended so that it cannot be scrolled. This can be a way to test whether your values are being set. In some widgets - GtkCList, GtkLayout, GtkText and GtkViewport - the adjustment values can be set internally by scrolling-aware container widgets, and these will override settings that are made manually. A GtkScrollbar, conversely, has no adjustment values until you set them. Caveat: if a scrollbar shares a GtkAdjustment object with a widget that has overriding pre-set values, the scrollbar will share the widget's adjustment settings as part of the process of becoming associated with that widget.

See also: GtkCList, GtkLayout, GtkProgressBar, GtkRange, GtkScale, GtkScrollbar, GtkScrolledWindow, GtkSpinButton, GtkText, GtkViewport, set_focus_hadjustment() , set_focus_vadjustment() .

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「GtkAdjustment Constructor」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | GtkAdjustment Constructor」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: