Home Segments Index Top Previous Next

651: Mainline

Having succeeded in displaying the top pane and the empty graph pane, you proceed to add a few messages that alter their appearance. One provides a label for the top pane. Another deletes the menu bar from the top pane. Two more establish the size and positioning of the top pane and the graph pane. And yet another suppresses the scroll bars that otherwise appear in the graph pane: Each change are marked by a change bar:

CalorieViewManager method definition • instance
createViews
  | theCalorieViewManager theTopPane theMeterPane |
  theCalorieViewManager := self.
  theTopPane := TopPane new.
  theMeterPane := MeterGraphPane new.
  "Set up the top pane"
  theCalorieViewManager addView: theTopPane.
  theTopPane owner: theCalorieViewManager.
  theTopPane labelWithoutPrefix: 'Demonstration Window'.            
  theTopPane noSmalltalkMenuBar.                                    
  theTopPane framingRatio: (1/4 @ (3/8) rightBottom: 3/4 @ (5/8)).  
  "Set up the meter pane"
  theTopPane addSubpane: theMeterPane.
  theMeterPane owner: theCalorieViewManager.
  theMeterPane noScrollBars.                                        
  theMeterPane framingRatio: (0 @ 0 rightBottom: 1 @ 1).            
  ...