473,503 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?

Environment:
VB.NET ( VS 2oo3 )
Windows.Forms.TextBox
Windows.Forms.HScrollBar

Any Ideas?
thx.

Jan 28 '06 #1
0 2596

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1722
by: Marina | last post by:
Here is the problem. If 2 different properties on the same (or different) control are bound to the same data column, changing the Text property and calling EndCurrentEdit discards the new value. ...
0
2756
by: Wesman | last post by:
Why does the following code not work (displays the correct values in the second textbox). if i chane the OnFocusChange method to the following it will work: private void OnFocusChange(object...
13
4282
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying...
3
17178
by: MuZZy | last post by:
Hi, Is there a way to: 1. Find out if a scrollbar is currently show on the TextBox 2. Get the width of the horizontal scrollbar I am doing a UserControl with a TextBox with a small image...
4
1964
by: Alan Silver | last post by:
Hello, I'm trying to use an ArrayList to do data binding, but am getting an error I don't understand. I posted this in another thread, but that was all confused with various other problems,...
1
2613
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
8
11954
by: =?Utf-8?B?QXNo?= | last post by:
Hi, I have an object, for example User. User contains various properties which i have been able to bind to successfully using wizards and the form view. However if the class User has a property...
2
1385
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have an incoming datatable in my web page and i'd like to bind one of the fields to a textbox. can someone please show me how to do this? thanks, rodchar
6
2892
by: Dmitry Duginov | last post by:
Hi, I have the following label markup (label is inside FormView): <asp:Label ID="lblIndicatorReady" runat="server" Text="RE" ToolTip="Ready" BackColor='<%#...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.