Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: Binding Windows Form controls to a class as a data source

$
0
0
Setting the binding through the GUI is not currently supported but you can set this up programmatically: Here is a simple example that binds the Text property of a textbox control to a string property.      $set ilusing"System.Windows.Forms"       class-id testwinform.Form1 is partial                 inherits type System.Windows.Forms.Form.       working-storage section.       01 mystring   string  value "TEST" property.       method-id NEW.       procedure division.           invoke self::InitializeComponent           goback.       end method.       method-id button1_Click final private.       procedure division using by value sender as object e as type System.EventArgs.           invoke textBox1::DataBindings::Add(new type Binding("Text", self, "mystring"))       end method.       end class.

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>