469,631 Members | 1,652 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Binding TextBox.Text to ScrollBar.Value

Hi there!

Is there a way to bind a Textbox.Text to a ScrollBar.Value (not the
Textbox-own Scrollbar) and vice versa?

The Problem:
I have to deal with two controls. The Textbox should accept integers as
input, limited by a ScrollBar's Minimum- and Maximum. Changing the
ScrollBar-Value should update the Textbox-Text and vice versa. So the
textbox-text and scrollbar-value represent the same value. The user is
free to either use the scrollbar or enter a integer in the textbox to
deal the same value. Further the allowed limitation for the entered
textbox-text is dynamicalle dependend by the scrollbars max and min.

I Guess a databinding form the textbox.text to cstr(scrollbar.Value)
and another one from Scrollbar.Value to cint(textbox.text) should work
- if possible and no deadlock !?! Is there a way to do so, and if, can
this be done by the Windows FormDesigner or by code only?

VB.NET ( VS 2oo3 )

Any Ideas?

Jan 28 '06 #1
0 2230

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Wesman | last post: by
13 posts views Thread by Paul Slavin | last post: by
3 posts views Thread by MuZZy | last post: by
8 posts views Thread by =?Utf-8?B?QXNo?= | last post: by
2 posts views Thread by =?Utf-8?B?cm9kY2hhcg==?= | last post: by
6 posts views Thread by Dmitry Duginov | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.