uisetcolor dialog box may appears partially outside the screen. How to fix this?

조회 수: 3 (최근 30일)
Luc Masset
Luc Masset 2018년 1월 24일
댓글: Jan 2018년 1월 24일
In fact it appears where you click. If you create a button with 'uisetcolor' as callback, the dialog box appears near the button. And if the button is near the screen borders, the dialog box is not displayed entirely, making it sometimes impossible to move!
  댓글 수: 4
Luc Masset
Luc Masset 2018년 1월 24일
BTW, how do you change the uisetcolor preference? I did not manage to find that.
Adam
Adam 2018년 1월 24일
As I mentioned, it may be different for that new colour picker, which I rejected. I created my own colour picker in the end, but I still find it useful to have uisetcolor sometimes which is why I set it to use the old version. It is a hidden preference in code rather than a visible one, as described in a comment to the answer in the linked thread.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2018년 1월 24일
편집: Jan 2018년 1월 24일
Not a direct solution of your problem, but maybe it helps to use one of the alternative color choosers: https://undocumentedmatlab.com/blog/color-selection-components
cc = javax.swing.JColorChooser;
[jColorChooser,container] = javacomponent(cc,[1,1,450,325],gcf);
jColorChooser.getColor
Or
cp = com.mathworks.beans.editors.ColorPicker;
[jColorPicker,container] = javacomponent(cp,[1,1,400,200],gcf);
Or:
options = 0;
icon = 0;
cp = com.mathworks.mlwidgets.graphics.ColorPicker(options,icon,'');
[jColorPicker,hContainer] = javacomponent(cp,[10,220,30,20],gcf);
  댓글 수: 2
Luc Masset
Luc Masset 2018년 1월 24일
Thx Jan. I know Yair's site. It just seems to be a bug to me. I will use Java ColorPicker if this bug is not fixed soon.
Jan
Jan 2018년 1월 24일
@Luc: Did you write a bug report to MathWorks already? Usually bugs are fixed with new versions and maybe the code of R2018a is not closed yet.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by