none
"Scroller" demo program RRS feed

  • General discussion

  • Hey, gang!  I just created a fun little program which demonstrates how to implement a "Scroller", also know as a "Marquee",
    which is just a window title which "scrolls" by from right to left.  The program also allows you to edit the scroll text, to enter
    any text you like.  Finally, it shows how to create simple "3-D" buttons, and how to get information from a Text window.
    Please check it out & let me know what you think!  But above all, as always - Have FUN!
    S' long for now!
    Monday, September 14, 2009 9:16 PM

All replies

  • Flurng, can you provide us the import ID, so we can all see your program?

    Monday, September 14, 2009 9:27 PM
    Moderator
  • Sorry, gang - small oversight on my part.  In any case, the import ID is: TLD322.    And, as before, please let me know what you think! 
    Wednesday, September 16, 2009 9:43 AM
  • Nice,

    How about setting Len = Text.GetLength(Scroll) after Scroll is updated in EditScroll .

    Also, when the mouse selects a button, you could check the Y coordinate and more precisely the X coordinate so that the button is only clicked when the mouse is actually over the button when clicked.

    I like the 3D button effect.  If you want to be more flashy, the button could change colour when the mouse is over it before it is clicked, animate when clicked, or even use images for the buttons states.
    Wednesday, September 16, 2009 5:43 PM
    Moderator
  • Nice,

    How about setting Len = Text.GetLength(Scroll) after Scroll is updated in EditScroll .

    Also, when the mouse selects a button, you could check the Y coordinate and more precisely the X coordinate so that the button is only clicked when the mouse is actually over the button when clicked.

    I like the 3D button effect.  If you want to be more flashy, the button could change colour when the mouse is over it before it is clicked, animate when clicked, or even use images for the buttons states.

    +1
    Fremy - Developer in VB.NET, C# and JScript ... - Feel free to try my extension
    Wednesday, September 16, 2009 6:25 PM
  • Very cool.  How about a version that scrolls in the graphics window?  Vertically?
    Wednesday, September 16, 2009 8:41 PM
  • "Nice,"

    "How about setting Len = Text.GetLength(Scroll) after Scroll is updated in EditScroll ."

    Thanks for the kind words, and, yeah - I'd thought about doing something like that, however if your updated text is particularly short, then you end up with just a tiny little scroll up in the top left corner of the window.  Personally, I think the farther it gets to scroll, the cooler it looks, so I was leaning toward finding the remaining length of the titlebar & then tacking that on the end, so the text ends up scrolling the whole length of the title bar.  I just hadn't gotten around to working out the code.

    "Also, when the mouse selects a button, you could check the Y coordinate and more precisely the X coordinate so that the button is only clicked when the mouse is actually over the button when clicked."

    Good catch!  I just wanted to keep the code as simple as possible so novices could follow it easier, and since there are no buttons or anything else to click on below the buttons, it's sort of redundant.  But you're right - it is very sloppy, and I certainly wouldn't let a finished project go out like that!

    "I like the 3D button effect.  If you want to be more flashy, the button could change colour when the mouse is over it before it is clicked, animate when clicked, or even use images for the buttons states."

    All very cool ideas, and I was sort of thinking I'd make it like a Windows '98 or XP menu bar, where items seem to "raise up" when you hover over them, but again, I just hadn't gotten around to it yet. 

    Thanks again for the input!  I'm glad you enjoyed the progam, and I hope it's given you an idea or two for your own coding.  If you should come up with something cool, be sure to post it - I know we'd all enjoy seeing it!

     
    Thursday, September 17, 2009 5:41 AM
  • Thanks for the reply, Fremy!  As I mentioned to litdev, I hope this has given you an idea or two for your own coding, although both you and he have done some great work already, so I'm sure you guys have some amazing ideas of your own to show off!
    Thursday, September 17, 2009 5:49 AM
  • Very cool.  How about a version that scrolls in the graphics window?  Vertically?

    You know, was I thinking of something quite similar myself - I just hadn't quite figured out the best way to do it.  I suppose the technique could be tweaked a bit to work with "GraphicsWindow.DrawBoundText" or something along those lines.  Feel free to tinker about with it yourself, if you like, & be sure to show us all what you come up with! 
    Thanks again for the kind words, & as always - Have FUN! ( 'Cause if it ain't fun, it ain't worth doing, right?! )
    Thursday, September 17, 2009 5:59 AM