Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6045045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:04:52+00:00 2026-05-23T07:04:52+00:00

Does anyone know of a double valued gauge in wxPython? I would like to

  • 0

Does anyone know of a double valued gauge in wxPython? I would like to show the range of a set of data that has been selected, I have the max and min values of the gauge and then I’d like to highlight the region of the gauge between two values. The normal wx.Gauge highlights from the gauge minimum (always the bottom of the gauge) to the set value.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:04:53+00:00Added an answer on May 23, 2026 at 7:04 am

    I’m not aware of any built-in widgets with the appearance of wx.Gauge that can do what you’re looking for.

    One option with a different appearance is RulerCtrl, which can give you two value indicators on a scale with whatever range you want. It just takes a bit of extra work to adapt it since not all of its properties are exposed in the listed methods. Quick example:

    import wx
    import wx.lib.agw.rulerctrl as rc
    
    class MinMax(rc.RulerCtrl):
        def __init__(self, parent, range_min, range_max, orient=wx.HORIZONTAL):
            rc.RulerCtrl.__init__(self, parent, orient)
    
            self.SetRange(range_min, range_max)
            self.LabelMinor(False)
            self.range_min = range_min
            self.range_max = range_max
    
            self.AddIndicator(wx.NewId(), range_min)
            self.AddIndicator(wx.NewId(), range_max)
    
            self.Bind(rc.EVT_INDICATOR_CHANGING, self.OnIndicatorChanging)
    
        def GetMinIndicatorValue(self):
            return self._indicators[0]._value
    
        def GetMaxIndicatorValue(self):
            return self._indicators[1]._value
    
        def SetMinIndicatorValue(self, value):
            # Value must be within range and <= Max indicator value.
            if value < self.range_min or value > self.GetMaxIndicatorValue():
                raise ValueError('Out of bounds!')
            self._indicators[0]._value=value
            self.Refresh()
    
        def SetMaxIndicatorValue(self, value):
            # Value must be within range and >= Min indicator value.
            if value > self.range_max or value < self.GetMinIndicatorValue():
                raise ValueError('Out of bounds!')
            self._indicators[1]._value=value
            self.Refresh()
    
        def OnIndicatorChanging(self, evt):
            # Eat the event so the user can't change values manually.
            # Do some validation here and evt.Skip() if you want to allow it.
            # Related: EVT_INDICATOR_CHANGED
            pass
    
    
    class MainWindow(wx.Frame):
        def __init__(self, parent, id, title):
            wx.Frame.__init__(self, parent, id, title)
    
            self.minmax = MinMax(self, 0, 100)
            self.minmax.SetSpacing(20)
            self.minmax.SetMinIndicatorValue(30)
            self.minmax.SetMaxIndicatorValue(84)
            self.Show()
    
    app = wx.App(redirect=False) 
    frame = MainWindow(None, wx.ID_ANY, "Range Indicator") 
    app.MainLoop()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how to find out the precision of long double on a
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that
Does anyone know of any existing packages or libraries that can be used to
Does anyone know a good Java lib that will hook into SVN so I
Does anyone know of a JavaScript library that accurately implements the IEEE 754 specification
Does anyone know how to get IntelliSense to work reliably when working in C/C++
Does anyone know how to transform a enum value to a human readable value?
Does anyone know of a FOSS Python lib for generating Identicons ? I've looked,
Does anyone know where online copies of the old The Perl Journal articles can
Does anyone know how I can, in platform-independent C++ code prevent an object from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.