Change width of trackbar

asked 2016-02-10 07:02:51 -0600

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

edit retag flag offensive close merge delete

Comments

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

hopefully the size adapts then.

berak gravatar imageberak ( 2016-02-10 07:14:53 -0600 )edit

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

hahne gravatar imagehahne ( 2016-02-10 07:19:49 -0600 )edit

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

pklab gravatar imagepklab ( 2016-02-11 02:05:28 -0600 )edit