Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to set the TextBox behavoir while scrolling

Posted on 2004-09-03
7
Medium Priority
?
178 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Accepted Solution

by:
Matti earned 800 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 200 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Suggested Courses

670 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