Solved

How to set the TextBox behavoir while scrolling

Posted on 2004-09-03
7
175 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 93
VBA: Personal Macro Retain/Highlight/Remove values in a selected column 4 37
Export Data to Different .csv Files 27 133
Modify Text File with Excel Macro 13 49
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

738 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