Change width of trackbar

asked Feb 10 '16

hahne gravatar image

Hi,

is there a way to influence the width of the trackbars? My trackbars go from 0 - 500 but the width is to small to increment e.g. by 1

The code is something like that:

cv::namedWindow(tb_win_name_win, CV_WINDOW_NORMAL);
cv::resizeWindow(tb_win_name_win, 500, 700);
cv::createTrackbar(string("R a_u"), tb_win_name_win, &auIR, alpha_slider_max, on_trackbar, &(param_map[0]));

And I get this: image description

Preview: (hide)

Comments

resize the trackbar window, close the program (regularily) ,and reopen.

hopefully the size adapts then.

berak gravatar imageberak (Feb 10 '16)edit

Thanks for the answer but sadly this does not work for me :(

hahne gravatar imagehahne (Feb 10 '16)edit

I would add: change width of trackbar label. 10chars (on Windows) it's a bit too little

pklab gravatar imagepklab (Feb 11 '16)edit