Solved

How to set the TextBox behavoir while scrolling

Posted on 2004-09-03
7
169 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

20 Experts available now in Live!

Get 1:1 Help Now