Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Can anyone help me with Scrollbars please?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kirkm - 03 Mar 2008 00:14 GMT
Thanks. I want a verticle scrollbar on a label.
That may not be allowed....  but if it goes on the Form,
how it is controlled?

Thanks - Kirk
Rick Rothstein (MVP - VB) - 03 Mar 2008 00:39 GMT
You can't add scrollbars to a label; however, if I understand why you are
asking this question correctly, you can use a TextBox and set its Lock
property to True to prevent users from being able to change the text in it.

Rick

> Thanks. I want a verticle scrollbar on a label.
> That may not be allowed....  but if it goes on the Form,
> how it is controlled?
>
> Thanks - Kirk
kirkm - 03 Mar 2008 01:07 GMT
On Sun, 2 Mar 2008 19:39:03 -0500, "Rick Rothstein \(MVP - VB\)"
<rick.newsNO.SPAM@NO.SPAMverizon.net> wrote:

>You can't add scrollbars to a label; however, if I understand why you are
>asking this question correctly, you can use a TextBox and set its Lock
>property to True to prevent users from being able to change the text in it.

Hi Rick, that's almost got everything I was after. Except the one
thing that stuffs it up.  How do I turn the cursor off?  Or make it
the same background colour as the textbox would do.  I'm using
SelStart = 0 to force the first line, but the flashing cursor spoils
the apperance.  I think this was why I moved to a label. Hmmm..
any thought?

Thanks - Kirk
Rick Rothstein (MVP - VB) - 04 Mar 2008 14:42 GMT
I am sorry, but I don't think I can help you with this. My suggestion was
based on things I know how to do with a TextBox over in the compiled world
of VB; however, it looks like the TextBoxes over there are completely
different that those you can use here in Excel. For example, the way I would
handle what you have just asked over in the compiled VB world is to
immediately set focus to another control whenever the TextBox got focus.
Doing that would mean the cursor would never appear in it. Doing this would
still allow the TextBox's scroll bar to work because touching that does not
give focus to the TextBox itself. However, it seems that whenever you touch
the scroll bar for an Excel TextBox, the TextBox itself gets focus
immediately... so the trick won't work in here.

Rick

> On Sun, 2 Mar 2008 19:39:03 -0500, "Rick Rothstein \(MVP - VB\)"
> <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote:
[quoted text clipped - 12 lines]
>
> Thanks - Kirk
Peter T - 03 Mar 2008 12:53 GMT
Another idea, put an ordinary Label in a Frame.
Give the frame a vertical scrollbar and size the frame to suit. Optionally
remove the Frame's caption, set Frame's BorderStyle=1, remove the Label's
border.

Manually or at run time set the ScrollHeight to Label's height (or tweak as
required).

Regards,
Peter T

PS, ensure the Label really is IN the Frame and not merely over it.

> Thanks. I want a verticle scrollbar on a label.
> That may not be allowed....  but if it goes on the Form,
> how it is controlled?
>
> Thanks - Kirk
elbeardo69 - 20 Mar 2008 23:40 GMT
I've just pondered this one.

My easy but dirty hack, a dummy textbox of size 0x0 anywhere.. ..then
.Activate it to send the annoying cursor elsewhere.

Anybody know how to highlight all the text AND set the first line in focus?
..I suppose I could just do the colour inverting myself...

> Another idea, put an ordinary Label in a Frame.
> Give the frame a vertical scrollbar and size the frame to suit. Optionally
[quoted text clipped - 14 lines]
> >
> > Thanks - Kirk
Peter T - 21 Mar 2008 10:07 GMT
FYI the OP posted feedback about the Label in a Frame approach in another
thread (last message in this link).

http://groups.google.co.uk/group/microsoft.public.excel.programming/browse_frm/t
hread/4cb232872ab94e96/f906336ba7114fb7?hl=en&lnk=st&q=#f906336ba7114fb7


Regards,
Peter T

> I've just pondered this one.
>
[quoted text clipped - 22 lines]
> > >
> > > Thanks - Kirk
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.