Solved

How to set the TextBox behavoir while scrolling

Posted on 2004-09-03
7
170 Views
Last Modified: 2010-05-02
hello experts,
i have a usercontrol that i am creating.  it consists of a TextBox and a CommandButton.  the button is embedde/on top of and at the end of the TextBox.  the problem is when text is entered it disappears under the button.  when entering text the control should allow text to be entered like normal until it hits the left border of the button at which point all text should the be entered as if the right border of the TextBox had been reached.  in addition if the user were to hit the end key the control should scroll to the very last character which will be displayed at the left border of the button.  if i could i would put the button on the outside of the TextBox and not have any problems but i have to adhere to a visual style for this control.  any help is greatly appreciated.
dennis
0
Comment
Question by:superbeast23
7 Comments
 
LVL 19

Expert Comment

by:Shauli
ID: 11976736
Do you want the command button to be with a fixed height on the upper right corner of the textbox, regardless of the height of the textbox, or do you want it to stretch up and down to the height of the textbox?

S
0
 

Author Comment

by:superbeast23
ID: 11977427
i want it to stretch as one unit like a combo box when the font size is changed.
0
 

Author Comment

by:superbeast23
ID: 11977443
i will be leaving for labor day weekend and will check responses after labor day just so you know.
Dennis
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Accepted Solution

by:
Matti earned 200 total points
ID: 11977662
Put the textbox and command button inside of a picturebox.
Set textbox bordersytle None and BackColor of the picture box Window Background.
0
 
LVL 13

Assisted Solution

by:Michael_D
Michael_D earned 50 total points
ID: 11977721
i think you should "fake" your textbox.
put label on your UC , make background color white (or window background)
over the label put textox with borderstyle set to 0 (the height of textbox should be a bit smaller then label's so you can see label's border) . on the right from texbox put your button.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 11980434
I'm thinking along the lines of Matti.  Why does the command button have to be on top of the textbox?  You can create the border you want and still place the command button adjacent to the textbox on its right edge w/o going through all of this extra trouble in maintaining this common behavior.
0
 
LVL 13

Expert Comment

by:Michael_D
ID: 11982698
Good question, AzraSound. But if superbeast23 wants so why not to do.
Matti, Picturebox is heavy object becouse of its functionality. and there is no need of it. that the reason I suggest use of label.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now