Questions tagged [trackbar]

1

votes
1

answer
1.9k

Views

How do I get the trackbar value?

I feel a little silly asking this, seems pretty simple but I can't find the solution anywhere. I have a trackbar made in visual studio 2008 and I want to use it to adjust an image threshold but I can't find the code to retrieve the sliders/markers position. Any help would be much appreciated and I...
Ruth
1

votes
1

answer
2.9k

Views

TrackBar Control acting as a Range Selector with Multiple Thumbs

I am after a control which works similarly to a TrackBar control but has three thumbs, one for selecting a value and two others for selecting the minimum and maximum values on the same control. I have searched Google for this and I have found a lot of people asking for the same thing (or similar ran...
RHodgett
1

votes
1

answer
1.6k

Views

c# easiest way to draw a line behind a trackbar

I am creating a application in c# and I would like to get the same effect on a trackbar component, like in the system volume application in windows 7 (the green line which represents the current sound level output). I'd like to draw a green line behind the trackbar depending on some logic. The prob...
blejzz
1

votes
1

answer
935

Views

Is cvCreateTrackbar available in emguCV?

I'm in the process of converting my application that was using an old OpenCV wrapper to EmguCV (updated and very good wrapper). So far so good, except that in one of my class, I was using 3 trackbars to adjust the threshold in some filters. The trackbar were created using this code in the old wrappe...
Jean-François Côté
1

votes
1

answer
1.7k

Views

.NET TrackBar MouseDown follow cursor?

I currently use this code to fix the bug where if you click somewhere on the Horizontal TrackBar it jumps to the middle then to the end of the TrackBar. So this code fixes that bug, which now jumps to the location you click. But still a problem remains when I keep my mouse down and move it around th...
SSpoke
1

votes
1

answer
4.1k

Views

How to pass user data using OpenCV trackbar

Currently I have a number of sliders that are used to change image values. I am using the OpenCV track bar for the slider which has a callback to a different function for each of my sliders. I would like to have my sliders callback point to a single callback function and then use the user data to id...
Tom smith
1

votes
1

answer
911

Views

win32 C++ Custom Color for Trackbar thumb

I have spent today searching everywhere for a concrete explanation or example of coloring the thumb on a trackbar (slider) in win32 C++. Everything I've found has been partially explained, and in trying every conceivable variation I have come up blank. The control I have been focused on is defined i...
Wayne McHugh
1

votes
1

answer
1.1k

Views

C# Changing color of label based on trackbar value

I am working with a trackbar that has a value of 0 to 100. In my code automatic = 0 that you see in the image below. What i am trying to accomplish is that any number below 35 should change the labels (lableFS) forcolor to red, while any number above that should change the labels forecolor to green....
user3627587
1

votes
1

answer
2.3k

Views

Trackbar to choose color. Using C++, opencv

In my project, user should select a color for some process. There are some applications on the internet. They create three trackbars for RGB values of color but I don't want to do it like that. I want to create a trackbar below or something similar. How can I create a trackbar like that? and How can...
ffttyy
1

votes
2

answer
711

Views

Textbox value into trackbar

I have a question. I have been doing VB Express 2015 in class for over three months now. If you place a trackbar and a textbox in a form, you can display the value of the trackbar in the textbox. Can you make it so that it goes the other way around? That if you type a value into the textbox, it appl...
Bas Daydrone
1

votes
2

answer
54

Views

Removing TextBox , Location issue C#

I want to create textboxes dynamically on trackbar_scroll. If trackbar has a value of 5, it may have 5 textboxes. When it decreases to 2, it must have 2 textboxes. Here is the problem when I decrease trackbar_scroll value: private void trackBar1_Scroll(object sender, EventArgs e) { foreach (Control...
Allah Rakha
1

votes
1

answer
38

Views

Trackbar has obvious unfixed bug?

When I add a trackbar to a form and set Me.TrackBar1.Minimum = 0 Me.TrackBar1.Maximum = 100 Me.TrackBar1.LargeChange = 10 Me.TrackBar1.SmallChange = 10 Me.TrackBar1.TickFrequency = 10 ... the trackbar goes berzerk: I can choose any small value by dragging the bar. The trackbar no longer sticks to va...
tmighty
1

votes
1

answer
92

Views

OpenCV trackbar assertion failed error

I want to do foreground segmentation using opencv. I have written code that has trackbars so that I can find optimal parameters for the segmentation. When the code is executed it works, the images are shown with contours marked and etc. But when I try to move bars on the track bar. I'm getting the f...
MathJunkiey
1

votes
1

answer
0

Views

How do you make a Winform track bar (slider) behave sensibly on a touch-screen monitor

What's the easiest way to modify a Winforms track bar so that when a user clicks on it the track bar jumps to the location of the mouse? By default the track bar moves to half way between it's current location and where the mouse was clicked. Update: I'm trying to do this so that I can use the track...
Matt Warren
1

votes
3

answer
0

Views

can't get value of trackbar on menu strip

I've added a trackbar to menu strip manually because vs 2008 doesn't allow me to do. However, i can't get the value of trackbar. Form1.cs: [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.MenuStrip | ToolStripItemDesignerAvailability.ContextMenuStrip)] public class TrackBarMenuIt...
dum
1

votes
1

answer
1.4k

Views

How to ensure that adjusting a TrackBar control with a mouse will set values multiple of SmallChange and not any in between?

I used .Net trackbar control. My trackbar point is 0...5...10..15. Problem is, when user scrolled trackbar they easily drop scroll in between points. But i wan't to that user only drop the scroll in my display point only. like they set only 0,5,10 etc. Not they set 6,7,8,9... I set SmallChanges prop...
Jeet Bhatt
1

votes
1

answer
3.6k

Views

OpenCV - Trackbar slider keeps going to zero with video

I'm trying to use the slider to control my lower and upper bounds for HSV masking. I'm able to get the slider but can't get it to hold the position I set; it keeps going back to zero each time a new frame is pulled in. import numpy as np import cv2 def nothing(x): pass cap = cv2.VideoCapture(0) w...
ss32
1

votes
1

answer
378

Views

Add markers to .NET trackbar

I'm using .NET trackbar to play data I've recorded on a device. It works great and I use it as a time line in a video player. as you can see in this image: Now, when playing the data recorded from the device, some times the data contains ERRORS and WARNING values. I want to add markers/labels when s...
yossico
0

votes
0

answer
11

Views

Delphi how to control volume using trackbar

I am using TMediaPlayer to play music and videos which works fine, but I want to control the volume using a trackbar that can slide from low to medium to high. Can someone please help me on how to code it or is there any other method to do it? Thanks!
B.Anderson
0

votes
0

answer
6

Views

Update trackbar value on mouse wheel

I am using the scroll event but this only update value in label when i click on trackBar and move it right or left. I see that i can move it when i use mouse wheel but this doesn't update value in label just moving it. private void metroTrackBar1_Scroll(object sender, ScrollEventArgs e) { lblVolume....
GeorgeSog
1

votes
1

answer
2.1k

Views

How to convert .NET Trackbar control integer value to floating-point percentage

I always get 0 for percentage when I do this: int trackBarValue = trackBar.Value; float percentage = trackBarValue / 100; What's wrong with my code?
user310291
1

votes
2

answer
1.5k

Views

TrackBar custom Small & Large Change on Mouse Move / Scroll Up & Down in VB.NET

Well I'm trying something like that: Private Sub TrackBar1_Scroll(sender As Object, e As EventArgs) Handles TrackBar1.Scroll Dim scv As Int32 = TrackBar1.Value Dim uni As [String] = 'ms' Select Case scv Case Is > 1000 scv = scv \ 1000 uni = 's' sender.SmallChange = 1000 Case Is > 100 sender.SmallCha...
Seazoux
2

votes
2

answer
2.7k

Views

Trigger event on trackbar ValueChanged, but not in code

I want to be able to modify the value property of a trackbar in code without triggering my event handler. I wish to trigger the event only when the control is changed by the user by dragging the slider or moving it with the keyboard. What's the simplest way of achieving this? I have 6 trackbars and...
Matt Esch
5

votes
1

answer
1.1k

Views

How to implement trackbar like this image - Android?

Please help me implement this view. Clicking circles brings up mouse over of actual value of min/max/target. Bar length don't according to any thing. But bar color's according to target circle. Thanks a lot
Leo Nguyen
3

votes
4

answer
4.1k

Views

Read Trackbar control value in C++/WinAPI program

I am writing a simple GUI application in Visual C++/Windows API. I have a Trackbar control on the dialogbox defined in resources as: CONTROL '',IDC_SLIDER1045,'msctls_trackbar32',0x50010000,23,52,141,16,0x00000000 I want to show the trackbar value on static text control, so I wrote: case WM_NOTIFY:...
David
2

votes
1

answer
336

Views

c# backgoundworker and trackbar

I have a problem with backgroundworkers. I have a trackbar, and when the user changes its value, then a new backgroundworker starts. There is a list of all backgroundworkers, and when a new one is started, all workers in the list call worker.CancelAsync(). It works when a user does slow changes on...
Smajler Kamil
2

votes
4

answer
7.7k

Views

How to check for TrackBar sliding with mouse hold and release

I have a trackbar in my WinForms program which by moving it a huge and time consuming method will be refreshed. Have a look at this code: trackBar_ValueChanged(object sender, EventArgs e) { this.RefreshData(); } This track bar has 20 steps. If user grab the trackbar's slider and pull it from 20 to 0...
Saeid Yazdani
2

votes
2

answer
3.2k

Views

How to adjust a TrackBar thumb size?

I can't adjust a TTrackBar thumb size to a higher size. See the image: I got a small thumb on the left, and I can't make it bigger (but not the TrackBar itself). Desired thumb size is shown on an image with a red area. Maybe I can use WINAPI somehow? C++ apps have bigger thumb often. This is what I'...
Prog1020
2

votes
2

answer
1.7k

Views

How can I bind a winforms Opacity to a TrackBar (slider)

I've got a winform with a BindingSource that has an int property named Opacity in its DataSource. I also have a TrackBar on the winform that I want to use to control the Opacity of the winform. I've bound the Value property on the TrackBar to the Opacity and that functions just fine, sliding the T...
Allen Rice
4

votes
3

answer
4.2k

Views

Adding a TrackBar control to a ContextMenu

Is it possible to add a TrackBar control to a ContextMenu? So when I right click, my ContextMenu will drop down and a TrackBar will appear as a menu item?
Icemanind
2

votes
1

answer
6.6k

Views

Slider/Trackbar alternative

Anyone know of a custom control that looks like this Volume control http://img806.imageshack.us/img806/9366/volumecontrol.png and works similarly to slider or trackbar? I tried googling but all I found was this, w/c is similar to the built-in trackbar control in VS2008. I don't use WPF; just C# 2.0.
sjlewis
1

votes
1

answer
1.3k

Views

How to create Trackbars which do not call any function? OpenCV 3.1 with Python 2.7

I'm trying to threshold an image. I have used the cv2.createTrackbar function as- cv2.createTrackbar('High H','image',0,179, None). Now the last part is what I'm having trouble with. Further in my code, I use highH = cv2.getTrackbarPos('High H','image') to get my trackbar value and use it in the cv2...
3

votes
2

answer
226

Views

C# trackbar not updating

i've run into this pretty tricky problem recently and i hoped somebody could help me. i have a program that uses trackbars as to display sound volume and it's controlled with an Arduino via serial. When i try to modify the value (programmaticaly) of the trackar (moving the slider) in any method, it...
Klue
3

votes
3

answer
2.4k

Views

How to set custom ticks on a TTrackBar in Delphi 2010?

I tried to set the tick style to tsManual, the min and max position to 1 and 100 respectively and add ticks at 9, 19, 79 and 89 and no ticks are shown at all except the detault first and last which the control automatically shows. I tried other values and none are ever shown. My code is: TrackBar1.T...
Eric Fortier
2

votes
1

answer
1.2k

Views

Is it possible to delete trackbar in OpenCV?

I want to make a MENU trackbar which change the parameter that the user want to change. So if it is set on '1' the BLUR trackbar appears and we can blur the picture, if '2' the ALPHA and BETA trackbars appear and we can change brightness and contrast but the BLUR trackbar is still visible and we can...
Nat
4

votes
2

answer
4.9k

Views

C# /windows forms: linking trackbar and textfield with a factor

linking a trackbar and a textfield is very easy in windows forms. it is like this: textBox.DataBindings.Add('Text', trackBar, 'Value'); the problem is, that trackbars only allow for integer values but i want to have floating point values. so i usually just divide the value by 100, since on the track...
4

votes
2

answer
10k

Views

How do I label the minimum, maximum, center ticks in a .net 3.5 trackbar?

I need to set a voltage in an application. I'm used to using sliders in Labview, and would like to replicate that using a C# program. I've figured out that the track bar only does integer values, so rather than have the range go from -5 to 5 using a double, I need to have the track bar go from -50...
Curt
4

votes
1

answer
8.6k

Views

Values on trackbar

Quick question; In C#, Windows Forms, is it not possible, to have a System.Windows.Forms.TrackBar show all its values, next to its ticks? I have not been able to find any way of doing this, which suprises me abit. Is there another way, to get this behavior? I really would like to avoid, creating 25...
Nicolai
2

votes
0

answer
172

Views

Make disabled sliders in Winforms appear more 'subtle'

When you set Enabled = false to a TrackBar, the result looks to the uninitiated user that the trackbar is still enabled (we superusers can tell, but that's only because we know what to look for). How can I make the trackbar more 'greyed out' to appear less 'enabled' ? In this example, the second sli...
Dan W
4

votes
2

answer
503

Views

Zoom using two forms

I have a multiple forms in my project. Form1 contains a pictureBox that displays a jpeg. In Form2 I have a trackBar that I would like to control the zoom level of the image in Form1. To keep it simple I only need 2 or 3 zoom levels. I've set the pictureBox to public in the Designer view. However, w...
Trevor Thompson

View additional questions