473,746 Members | 2,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help on slider control

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
Jul 17 '05 #1
1 6865
Jason Charalambides <ja****@mail.ut exas.edu> schreef in berichtnieuws
qh************* *******@twister .austin.rr.com. ..

Hello Jason,
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.
That might be a problem, 'cause the slider seems to work with a long-integer
(whole numbers only). It looks like you will have to convert yourself (Hint
: just divide the gotten value by what it can become at max.)
The problem for me is how do I associate the slider to that variable?
You can't/don't. Just like with the other controls, you just, when you need
it, request whatever you need from the control to be returned. Like as in
most cases, you can "grab" the current value from the Slider using (what
else :-) Slider1.value
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?
That's another way to work with the Slider's value (the control pushing it's
value into the outside world, as opposed to the outside world grabbing it
from the control).

You can change an outside variable from within one of the Slider's events.
The two events that could be used for it are the Change and Scroll -event.
In either you could place something like :

{Outside-variable} = Slider1.value
Thank you

You're welcome.

By the way : Most in the above is generic (is true for all controls), and a
little (like the exact name of the usable events) was found by me looking in
the Help-file, under Slider. Just a hint ... :-)

Rudy Wieser

Jul 17 '05 #2

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

Similar topics

by: dlarsson | last post by:
Music CD experts: So, here's my problem. I burned (or tried to burn) my first audio or music CD on my computer using Windows Media Player. I "Rip-ed" the tracks from a source CD and then put
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.
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
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...
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...
by: S Moran | last post by:
c# 2.0 windows form with a slider control. trying to make the form opacity change as the slider is moved. problem (i think) is that the opacity property takes a percent-based number. so... 50% if you do it at design time, but .5 if you do it via code... but the slider increments in whole numbers so i guess i have to convert somewhow? an example would be appreciated thank you
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,
by: Philklc | last post by:
I'm working on a website which will use the Slider control from YUI. It runs when onDOMReady is executed. But my website has a global header that must be put on all pages, which has a site navigation menu which uses onContentReady. It caused the Slider control to stop working. And since I'm just an intern, I do not have the permission to change it. I need a way to make onContentReady and onDOMReady co-exist. Can anyone help? ...
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)
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...
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...
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...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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...
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();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.