Prev | Current Page 107 | Next

David Berube

"Practical Reporting with Ruby and Rails"

The other alternative is MATRIX_BY_ROWS, which stacks controls
vertically. The second parameter, 4, specifies how many controls should be placed inside
the FXMatrix control before starting a new row. For example, you could set MATRIX_BY_ROWS
with a parameter of 2 to make a long vertical row of labels next to a vertical row of text
boxes.
After you have a place to put your report controls, you create them:
FXLabel.new(control_matrix, 'Game:')
@game_combobox = FXComboBox.new(control_matrix, 30,
nil, COMBOBOX_STATIC | FRAME_SUNKEN )
@game_combobox.numVisible = 5
This code creates two controls: an FXLabel, which is a visual indicator of the purpose
of the next control, and an FXComboBox, which is a list of elements that can be accessed by
clicking a drop-down arrow. The second parameter to the FXComboBox constructor is the
width. The third parameter is the message target. This parameter is a relic from the
CHAPTER 4 n CREATING REPORTS ON THE DESKTOP 70
original FOX implementation in C, and you won??™t typically use it in an FXRuby application.


Pages:
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
Cepilacja pastą cukrową kraków Anteny satelitarne Dubaj hotel upadlanych.waw.pl