Link to home
Start Free TrialLog in
Avatar of superbeast23
superbeast23

asked on

How to set the TextBox behavoir while scrolling

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
Avatar of Shauli
Shauli

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
Avatar of superbeast23

ASKER

i want it to stretch as one unit like a combo box when the font size is changed.
i will be leaving for labor day weekend and will check responses after labor day just so you know.
Dennis
ASKER CERTIFIED SOLUTION
Avatar of Matti
Matti
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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.