Results 1 to 14 of 14

Thread: Add text to panel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Add text to panel

    How do you add text to a panel?? I want to have something that will scroll a string, and I read you can use a panel with the auto scroll property set to true. How do I add text to the panel?? Thanks

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,415

    Re: Add text to panel

    put a textbox on your panel, set autoscroll to true + you can scroll your panel to see all of your textbox

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Add text to panel

    There's no point putting a TextBox on a Panel to get scrolling when the TextBox itself supports scrolling. Just add a TextBox to your form, set Multiline and ReadOnly to True and then make it the size you want.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Add text to panel

    I want it to scroll automatically though if the sting is longer than the textbox and continuosly scroll across while the application is open. Not a slider or left/right arrow to scroll. For fun I am making an MP3 player and I want the song title and artist to scroll arcross.
    Last edited by giants00; Feb 9th, 2010 at 04:11 PM.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Add text to panel

    Quote Originally Posted by giants00 View Post
    I want it to scroll automatically though if the sting is longer than the textbox and continuosly scroll across while the application is open. Not a slider or left/right arrow to scroll. For fun I am making an MP3 player and I want the song title and artist to scroll arcross.
    This is the sort of information you need to provide up front. A FULL and CLEAR description of the problem is required because we're unlikely to guess that sort of thing.

    The term usually applied to that sort of thing is a "marquee". If you search for that term you'll find examples. There are a couple at least in the CodeBank; even one by me. You can follow the CodeBank link in my signature to find that, but there is at least one more as well.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Add text to panel

    Quote Originally Posted by jmcilhinney View Post
    This is the sort of information you need to provide up front. A FULL and CLEAR description of the problem is required because we're unlikely to guess that sort of thing.

    The term usually applied to that sort of thing is a "marquee". If you search for that term you'll find examples. There are a couple at least in the CodeBank; even one by me. You can follow the CodeBank link in my signature to find that, but there is at least one more as well.
    OK no problem, thanks for the help. Is the marqueeLabel sample program attached in the zip file compatible with VB 2008 express edition? When I try and open the program it says "project type (.csproj) is not supported by this version of the application."

  7. #7
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,415

    Re: Add text to panel

    .csproj is a c# project
    .vbproj is a vb.net project

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Add text to panel

    Quote Originally Posted by giants00 View Post
    OK no problem, thanks for the help. Is the marqueeLabel sample program attached in the zip file compatible with VB 2008 express edition? When I try and open the program it says "project type (.csproj) is not supported by this version of the application."
    You should go to the VB.NET CodeBank rather than the C# CodeBank. If you are following the link in my signature then there's one for each. Many of my CodeBank threads, that one included, have a link to the equivalent thread in the other (C#/VB) language in the very first line. Make sure you read what's in front of you first. That's why people go to the trouble of writing it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Add text to panel

    Quote Originally Posted by jmcilhinney View Post
    You should go to the VB.NET CodeBank rather than the C# CodeBank. If you are following the link in my signature then there's one for each. Many of my CodeBank threads, that one included, have a link to the equivalent thread in the other (C#/VB) language in the very first line. Make sure you read what's in front of you first. That's why people go to the trouble of writing it.
    No offense man, but you can stop talking to me like im an idiot. I appreciate the help but if you are just going to try and cut me down to make yourself feel all high and mighty then don't reply to the post. You really think I can't read if it says VB.NET code bank or C#? I am a electrical test engineer working in the semiconductor industry. I took about one programming class about 6 years ago, and I have been learning on the job how to write automation test software. In only one month time, I succesfully have an application in place in production that communicates through gpib and 8 lcr, dvm, power supply meters, and a prober to handle percise positioning and take over 500K accurate electrical measurements in a little under a hour and a half. And by the way no it doesn't work in the vb express edition, I tried at work and at home with the same result. I know for a fact I am trying to open the vb version. Hmm sorry you think I am that dumn that I cant read the difference between vb project file and c# project file?? gimmie a break man

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Add text to panel

    If you were opening a VB project and a VB project only then it wouldn't be telling you that a CSPROJ file isn't supported by the IDE. Either you're opening a C# project directly or a solution that contains a C# project. Maybe the one solution contains both projects but, in that case, the VB project should open and the C# one should be unavailable. Exactly where are you downloading this project from?
    Last edited by jmcilhinney; Feb 9th, 2010 at 10:53 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Add text to panel

    See when you explain it to me like a regular person I figured it out in a bout two seconds. The zip contains two folders one titled marqeeLabal which contains the vb files, and a second titled marqueeLabel1 which contains the c# files. Since you explain what should be happening, and what could be causing the issue instantly I thought oh OK cut the folder that contains the vb project and put that into its own folder. Problem solved. Thanks

  12. #12
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Add text to panel

    I had forgotten that I'd put both the VB and C# projects in the same solution in that case. That said, I did put this:
    EDIT: The solution attached now contains a VB project and a C# project.
    directly above the download link in November of 2008. As I said, I was under the impression that if you opened a multi-language solution in an Express IDE that it would simply open those projects it supported and those it didn't were unavailable. I'm sure that's what happened in 2005 but it's a long time since I used Express.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Add text to panel

    I built the marqueeLabel program and added the marqueeLabel.dll to a new project. At the top I add Imports MarqueeLabel, and I am declaring it in this way.

    dim scrollText as MarqueeLabel = New MarqueeLabel

    When I type New only MarqueeLabel namespace comes up and not the MarqueeLabel class. I get a type expected error because of this I think. Shouldn't it by the MarqueeLabel class after new? Any thoughts on why I can't access the MarqueeLabel class? I see the class in the object browser for the MarqueeLabel.dll. Thanks for the help
    Last edited by giants00; Feb 10th, 2010 at 03:14 PM.

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: Add text to panel

    problem was found to be namespace and class were both named marqueelabel. After making there names different there is no more problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width