473,466 Members | 1,439 Online
Bytes | Software Development & Data Engineering Community
Create 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
J.C.
Jul 17 '05 #1
1 6852
Jason Charalambides <ja****@mail.utexas.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 ... :-)

Regards,
Rudy Wieser

Jul 17 '05 #2

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

Similar topics

1
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...
3
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...
2
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...
0
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......
1
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...
3
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%...
6
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,...
8
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...
1
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.