Prev | Current Page 106 | Next

David Berube

"Practical Reporting with Ruby and Rails"

Note that you are using the default icon for this application,
which is the nil, nil part of the call. The first of those two nil parameters sets the
normal icon, and the second sets the minimized icon for your window. The third line sets
the width and height. (You can actually set the height and width via optional parameters
to the constructor, but this method is clearer, since the constructor already has a large
number of parameters.)
Next, you need to place a strip of controls at the top of the window. These controls
will be used to select the player and game for the report. Whenever these settings are
changed, the graph should automatically update. Before you add the controls, you need
to create a space to put them:
control_matrix=FXMatrix.new(@main_window,4, MATRIX_BY_COLUMNS)
This line creates a new FXMatrix called control_matrix, which is a FOX container in
which you can place other controls. As noted earlier, by default, an FXMainWindow object
places controls vertically. The MATRIX_BY_COLUMNS flag in the FXMatrix constructor makes it
stack controls horizontally.


Pages:
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
kobiecy Danny grafika biaƂystok Leona Lewis hale