473,670 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GUI slider control

Could someone tell me the easiest way to create a GUI slider control in
Python?

Apr 28 '06 #1
1 2442
mi******@gmail. com wrote:
Could someone tell me the easiest way to create a GUI slider control in
Python?


This is how we do it in the hood:
from Tkinter import *

def callback(value) :
print value

tk = Tk()
s = Scale(tk, orient=HORIZONT AL, command=callbac k)
s.pack()

tk.mainloop()
I'm not sure about outside the hood.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
Apr 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6861
by: Jason Charalambides | last post by:
I need to assign a slider to determine a percentage value for a certain variable in my program. I decided to use a slider so that the user will be able to manually set a value between 0.000... to 1.000 for that variable. The problem for me is how do I associate the slider to that variable? Do I need to write something specific within that or do I just give the slider control the name of the variable that it shall control? Thank you J.C.
2
3302
by: juergen | last post by:
how to design a trackbar/slider with diff. look??? For my win-application I need a trackbar/slider, that doesnt look like the control-trackbar offered by vb.net. ; e.g. something like the slider in win-mediaplayer..., but with my own design. tried to change the look, and create something that works like a slider, but didnt find a solution yet
3
4382
by: CaffeineRush | last post by:
Is there an existing control that functions like the slider control used in Fireworks when selected the JPEG Quality? A combo-box style drop-down button is clicked which results in the presentation of a slider control. This control appears to be tied to a text box whose value is updated as the slider moves. Hope I'm just overlooking something. Thanks.
1
2151
by: degroof | last post by:
http://degroof.home.mindspring.com/hb/colors.html Simple slider control made from two div tags. Slider can be vertical, horizontal or XY. Demo page is a color picker with two sets of color controls: RGB and HSL. User can adjust the color using either set and the other is updated accordingly. User can also enter and HTML color in a text field and both sets
2
3546
by: Paul Helmuth | last post by:
All, I am trying to assess how much work it is going to be to "port" my current Visual Studio 6.0 applications to dotNet. It seems like many things that should be trivial are really problematic. I'm sure this mostly (but not completely) due to my lack of experience with dotNet. Anyway, the latest "trivial" issue concerns the Slider ActiveX control from
0
1903
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers... then taking that date range and finding dates specifiec between them (in a list of dates) and putting snap marks, so if you slide it near one of them it should snap to that tick, but that part i cant figure out. the rest seems ok so far... here...
1
2288
by: Israel | last post by:
The problem: I want to know, definitively when a slider loses focus after a user has started sliding and hasn't released the mouse yet. It appears that this is captured with the WM_ACTIVATEAPP message but this only goes to the form and I want it in the user control that maybe very much removed from the form's knowledge; i.e. the form may launch a 3rd party form that, upon a call back, decides to launch other form that has my user control...
4
1958
by: bill | last post by:
How can I create a slider control or visual scale control which fires a server-side event when a selection is made? I would appreciate any tips. Thanks Bill
6
3093
by: cmgmyr | last post by:
Hello, I'm trying to figure out how to disable a slider through the onChange function. Here is what I have so far: new Control.Slider('handle','slider', { axis:'horizontal', sliderValue: 1, range: $R(1, 100), alignY:0,
1
2175
by: Mel | last post by:
Anyone know how to capture an event when the slider changes? Is this possible with this control or is there a different control I should consider instead? I want to use a slider to allow the user to rotate an object on the screen from 0 to 360 degrees. Upon changing the slider the object would rotate. (using Asp.net 2.0, visual studio 2005, vb.net, WinXP Pro SP2)
0
8471
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8815
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7421
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5686
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4213
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4393
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1795
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.