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
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
ASKER
i want it to stretch as one unit like a combo box when the font size is changed.
ASKER
i will be leaving for labor day weekend and will check responses after labor day just so you know.
Dennis
Dennis
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
Matti, Picturebox is heavy object becouse of its functionality. and there is no need of it. that the reason I suggest use of label.
S