private void InitializeComponent() { // // costWidget // this.costWidget = new PlotWidget(); // // volumeWidget // this.volumeWidget = new PlotWidget(); // // closeButton // this.closeButton = new Gtk.Button("Close"); this.closeButton.Clicked += new System.EventHandler(this.closeButton_Click); // // FinancialDemo // this.SetSizeRequest(630, 450); // // Define a 10x10 table on which to lay out the plots and button // Gtk.Table layout = new Gtk.Table(10, 10, true); layout.BorderWidth = 4; Add(layout); AttachOptions opt = AttachOptions.Expand | AttachOptions.Fill; uint xpad = 2, ypad = 10; layout.Attach(costWidget, 0, 10, 0, 6); layout.Attach(volumeWidget, 0, 10, 6, 9); layout.Attach(closeButton, 1, 2, 9, 10, opt, opt, xpad, ypad); this.Name = "PlotSurface2DDemo"; this.Name = "FinancialDemo"; }
private void InitializeComponent() { quitButton = new Gtk.Button(); nextPlotButton = new Gtk.Button(); prevPlotButton = new Gtk.Button(); printButton = new Gtk.Button(); exampleNumberLabel = new Gtk.Label(); // Create the two display panes for the samples plotWidget = new PlotWidget(); infoBox = new Gtk.TextView(); quitButton.Name = "quitButton"; //quitButton.TabIndex = 14; quitButton.Label = "Close"; quitButton.Clicked += new System.EventHandler(quitButton_Click); nextPlotButton.Name = "nextPlotButton"; //nextPlotButton.TabIndex = 17; nextPlotButton.Label = "Next"; nextPlotButton.Clicked += new System.EventHandler(nextPlotButton_Click); printButton.Name = "printButton"; //printButton.TabIndex = 9; printButton.Label = "Print"; printButton.Clicked += new System.EventHandler(printButton_Click); prevPlotButton.Name = "prevPlotButton"; //prevPlotButton.TabIndex = 15; prevPlotButton.Label = "Prev"; prevPlotButton.Clicked += new System.EventHandler(prevPlotButton_Click); exampleNumberLabel.Name = "exampleNumberLabel"; infoBox.Name = "infoBox"; //infoBox.TabIndex = 18; SetSizeRequest(632, 520); // // Define 11x8 table on which to lay out the plot, test buttons, etc // layout = new Gtk.Table(11, 8, true); layout.BorderWidth = 4; Add(layout); infoFrame = new Frame(); infoFrame.ShadowType = Gtk.ShadowType.In; infoFrame.Add(infoBox); AttachOptions opt = AttachOptions.Expand | AttachOptions.Fill; uint xpad = 2, ypad = 10; layout.Attach(infoFrame, 0, 8, 9, 11); layout.Attach(plotWidget, 0, 8, 0, 8); layout.Attach(quitButton, 3, 4, 8, 9, opt, opt, xpad, ypad); layout.Attach(printButton, 2, 3, 8, 9, opt, opt, xpad, ypad); layout.Attach(prevPlotButton, 0, 1, 8, 9, opt, opt, xpad, ypad); layout.Attach(exampleNumberLabel, 4, 5, 8, 9); layout.Attach(nextPlotButton, 1, 2, 8, 9, opt, opt, xpad, ypad); Name = "PlotSurface Samples"; }