Results 1 to 6 of 6

Thread: Progress Bar

  1. #1
    Member
    Join Date
    Jan 2010
    Location
    Montreal, Canada
    Posts
    40
    Rep Power
    19

    Progress Bar

    Is there any way of changing the color of the character drawing the progress bar? The following

    Console_ProgressBar (1, 10, 10, 50, 192, 1, 100, PBValue)

    draws a red progress bar which progresses greyish-red. I have not found any way of having it progress blue, or green (while the remainder stays red).

    Rick

  2. #2
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: Progress Bar

    Mmmh, the samples I run are always yellow. Can you provide a sample?

  3. #3
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: Progress Bar

    Ok, I figured it out. I'm just not sure what the highlight part of the color functions mean.

    [code=thinbasic]

    Console_ProgressBar(1, 10, 10, 50, Console_BackgroundRGB(255,0,0,50)+Console_ForegroundRGB(0,00,200,50), 1, lMax(1), Count(1))

    [/code]

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: Progress Bar

    I cannot check right now because I do not have sources with me.
    I will check this night and see what the code is doing in that area.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: Progress Bar

    Console colors are a value from zero (black on black) to 255 (white on white).
    To have full console color range see example in \thinBasic\SampleScripts\Conrole\Console_OutColor.tBasic

    To have red background color with blue foreground color use color number 201
    To have red background color with green foreground color use color number 202

    Eros
    Attached Images Attached Images
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    Member
    Join Date
    Jan 2010
    Location
    Montreal, Canada
    Posts
    40
    Rep Power
    19

    Re: Progress Bar

    Thank you, Eros. 250 works nicely.

    Rick

Similar Threads

  1. progress bar
    By Lionheart008 in forum UI (User Interface)
    Replies: 2
    Last Post: 12-12-2009, 00:14

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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