#37 ProgressBar

Win32::GUI::Core
open
1.07 (5)
7
2008-01-31
2005-11-23
Anonymous
No

eric_hansen85@yahoo.com
ehansen@controlpointsolutions.com
I would like to see the Win32::GUI::ProgressBar with
the MULTICOLOR features found in Tk:ProgressBar.
Thank you. This allows ranges in the ProgressBar to
be different colors. Win32::GUI only allows one
color for the entire PBar. Thanks! Eric Hansen

use Tk;
...
my $PBAR1 = $mw->ProgressBar(
-borderwidth => 1,
-relief => 'sunken',
-width => 20,
-length => 500,
-padx => 10,
-pady => 10,
-variable => \$status_var1,
-colors => [0 => 'red', 15 => 'yellow' , 30
=> 'green', 60 => 'white', 70 => 'blue'],
-resolution => 0,
-troughcolor => 'black',
-blocks => 75,
-gap => 2,
-anchor => 'n',
-from => 0,
-to => 75
)->pack(
-padx => 20,
-pady => 20,
-side => 'left',
-fill => 'both',
-expand => 0
);

Discussion

  • Robert May

    Robert May - 2005-11-30

    Logged In: YES
    user_id=674651

    The underlying win32 progress bar control has no native
    support for such a feature, so the only approach here would
    be to write a custom control (or perhaps sub-class the
    existing progress bar).

    It wouldn't be particularly hard to do, but unless you can
    drum up more people who would find this useful I don't see
    it being a part of the near-time WIn32::GUI development, as
    there are more important (in *my* opinion) thing to be
    getting on with.

    Regards,
    Rob.

     
  • Robert May

    Robert May - 2005-11-30
    • priority: 5 --> 1
    • assigned_to: nobody --> robertemay
     
  • Robert May

    Robert May - 2006-06-07
    • priority: 1 --> 2
     
  • Robert May

    Robert May - 2008-01-31
    • labels: --> 1.07
    • milestone: --> Win32::GUI::Core
    • priority: 2 --> 7
     

Log in to post a comment.