PC Review


Reply
Thread Tools Rate Thread

Can anyone help me with Scrollbars please?

 
 
kirkm
Guest
Posts: n/a
 
      3rd Mar 2008

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
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      3rd Mar 2008
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


"kirkm" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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


 
Reply With Quote
 
kirkm
Guest
Posts: n/a
 
      3rd Mar 2008
On Sun, 2 Mar 2008 19:39:03 -0500, "Rick Rothstein \(MVP - VB\)"
<(E-Mail Removed)> 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
 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      3rd Mar 2008
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.

"kirkm" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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



 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      4th Mar 2008
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


"kirkm" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sun, 2 Mar 2008 19:39:03 -0500, "Rick Rothstein \(MVP - VB\)"
> <(E-Mail Removed)> 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


 
Reply With Quote
 
elbeardo69
Guest
Posts: n/a
 
      20th Mar 2008
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...

"Peter T" wrote:

> 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.
>
> "kirkm" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > 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

>
>
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      21st Mar 2008
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/mic...06336ba7114fb7

Regards,
Peter T


"elbeardo69" <(E-Mail Removed)> wrote in message
news:6A5C9434-3B53-49B4-A2A5-(E-Mail Removed)...
> 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...
>
> "Peter T" wrote:
>
> > 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.
> >
> > "kirkm" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > >
> > > 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

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrollbars --Fragman-- Microsoft Dot NET Framework Forms 1 13th Mar 2006 09:41 PM
How do I add scrollbars? =?Utf-8?B?TXJOb2JvZHk=?= Microsoft C# .NET 3 1st Oct 2005 01:29 AM
Scrollbars Chris Smith Microsoft VB .NET 10 15th Sep 2004 04:15 PM
Scrollbars James Microsoft Access Forms 1 21st Jan 2004 06:23 PM
Scrollbars bigturnip Microsoft Access Forms 0 21st Jan 2004 10:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:23 PM.