Solved

Scrolling textboxes/picture boxes

Posted on 1998-12-09
12
197 Views
Last Modified: 2010-05-03
I've got a program that automatically adds text to a picture box.  (I've tried with multiline textboxes also, with no effect).
I want it, when it gets to the bottom of the box, to automatically scroll up to keep the bottom-most line at the bottom of the textbox.  No matter what I've tried, it goes off the bottom and the view remains at the top...
Please help... I'm at a total loss.... :(
0
Comment
Question by:Kane070698
[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
  • 6
  • 4
  • 2
12 Comments
 
LVL 14

Expert Comment

by:waty
ID: 1448963
0
 

Author Comment

by:Kane070698
ID: 1448964
It looks like that creates a scrollable picture box, but I'm still at a loss on understanding it... :(  no picture is put in the picture box in question.  Just lines of text appended to the end of it.  The problem is that I need to have it scroll up automatically with each new line appended to it...  (like.. in a dos window)  
Perhaps a textbox or something similar to that would be more suitable?  I'm still flexible at this point as to how it's done..  (doesn't *have* to be a picture box)
0
 
LVL 14

Expert Comment

by:waty
ID: 1448965
You could use a listbox. I do this in a listbox to have logfile of some applications.
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.

 

Author Comment

by:Kane070698
ID: 1448966
Ok, I tried it out...  looks like a listbox may suit my needs better, but from VB's online help, I still can't figure out how to get it to keep the scroll at the bottom instead of parked at the top...
I did a simple test using a FOR loop, and add the counter to the list box...  To add more items than fit on the box....  It remained parked at the top instead of keeping the most recent entry in view in the bottom...
I'll re-open this in case someone else has an answer.... :)
0
 
LVL 14

Expert Comment

by:waty
ID: 1448967
To add at the top
  List1.AddItem "Test", 0

To add at the bottom
  List1.AddItem "Test", List1.ListCount
0
 

Author Comment

by:Kane070698
ID: 1448968
Thanks, but the view still remains firmly parked at the top of the list...
0
 

Author Comment

by:Kane070698
ID: 1448969
re-opening....
0
 
LVL 3

Accepted Solution

by:
jbil earned 100 total points
ID: 1448970
after additem use this line

List1.ListIndex = List1.ListCount - 1


0
 

Author Comment

by:Kane070698
ID: 1448971
That's got it...   Thanks....

A little tinkering, and I might be able to get rid of the blue selection highlight... :)  

0
 

Author Comment

by:Kane070698
ID: 1448972
I'm sorry....  I didn't notice-different person....
Many thanks to you too, waty....   I wish I could split the points... :)
0
 
LVL 14

Expert Comment

by:waty
ID: 1448973
No problem, I will probably respond to a further question coming from you.... :)
0
 
LVL 3

Expert Comment

by:jbil
ID: 1448974
Re:   A little tinkering, and I might be able to get rid of the blue selection highlight... :)  



List1.Selected(List1.ListCount - 1) = False
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 115
How to make an ADE file by code? 11 106
Sub or Function is not defined 6 59
VB6 calling COM DLL written in Visual Studio 2003 6 52
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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