Solved

Simple Scrollbar

Posted on 2000-04-13
12
251 Views
Last Modified: 2012-05-04
This is annoying!  I'm including a textbox on a form  with enable=false that I'd like to be scrollable so that all the information be read without allowing them to change the information.  I've seen many programs use a feature like this for disclaimers and such and I'd like to put one in my own program.
I've tried the KEEPSCROLLBARSVISIBLE but I can't seem to get it.  Yes, I also did put in the command for scrollbarvertical or whatnot.
Thanks!

-rick
0
Comment
Question by:saksafon2
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 2711911
Instead of Enable=False, set Locked=True
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2711923
Yeah, I got good results with Locked=True, Scrolbars = 2 - Vertical and Multiline = True

No API stuff needed.
0
 

Author Comment

by:saksafon2
ID: 2711956
Close, but the scrollbar doesn't appear as  soon as the form is loaded.  It doesn't appear until you actually click the text box.

Idea?

rick
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2712086
? it does in my case. What version of VB / operating system are you running?
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2712089
or... what happens if you don't use the mouse but you tab into the text box?
0
 

Author Comment

by:saksafon2
ID: 2712137
I'm using VBA from Word '97.  When I hit tab the scroll bar appears, but the text inside scrolls to the very bottom.  I tried setting tabindex to 0 but it scrolls to the bottom also.

hM!

rick
0
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.

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 2712528
Leave the Textbox editable and in the KeyPress event set KeyAscii = 0. But be prepared to have blinking!
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2712559
"I'm using VBA from Word '97"

Woohoo... I thought you were using VB. Figure that...
0
 

Author Comment

by:saksafon2
ID: 2712635
Everything else I've asked seemed compatible, and if not, it was easy to figure it out.  

-rick
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2712671
Not at all. You had me running around like a lunatic trying to work out why the heck *my* textbox behaved perfectly and *yours* did not.... If you had told us from the start that you were looking at a VB*A* text box and not a VB text box things would have been a lot clearer.

No hard feelings, but try to be a bit more precise in describing your problem in the future.
0
 
LVL 2

Expert Comment

by:Crin
ID: 2712758
Hello,
set Text1.SelStart to 0
and Text1.SelLenght to 0
with Text1.Locked = true

This works :)

Sincerely yours,

Crin
0
 
LVL 2

Accepted Solution

by:
Crin earned 25 total points
ID: 2712780
Of course, place this code after changeing your Textbox.Text if you change it in code, or in UserForm_Initialize subroutine.

Sincerely yours,

Crin
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
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…

705 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

12 Experts available now in Live!

Get 1:1 Help Now