Track Bar and TextEdit

  • Thread starter Thread starter margoulin
  • Start date Start date
M

margoulin

Hi,

how can I easily link a Trackbar to a TextEdit control in order to see the
trackbar value in it ?
thanks.

-Marc
 
Marc,

You are going to like this. =)

Assuming that your trackbar is named mobjTrackBar and your textbox is
named mobjTextBox, use this one line to hook it all up:

// Bind the value member of the trackbar to the textbox.
mobjTextBox.DataBindings.Add("Text", mobjTrackBar, "Value");

Hope this helps.
 
I dream of something like that !!!! :))
thanks !

-Marc

Nicholas Paldino said:
Marc,

You are going to like this. =)

Assuming that your trackbar is named mobjTrackBar and your textbox is
named mobjTextBox, use this one line to hook it all up:

// Bind the value member of the trackbar to the textbox.
mobjTextBox.DataBindings.Add("Text", mobjTrackBar, "Value");

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

margoulin said:
Hi,

how can I easily link a Trackbar to a TextEdit control in order to see the
trackbar value in it ?
thanks.

-Marc
 
Back
Top