gui slider disappears from figure
15 ビュー (過去 30 日間)
古いコメントを表示
I have a script that when runs opens a gui. It has several sliders.
When I run the script with one particular input everything works fine.
When I run the script with another input one particular slider disappears once I start to assign entries to its handle, fx.:
set(slider,'Min',1)
I have followed this in debug mode, and I see that it is still supposed to be Visible (this entry is stil 'on')! It could be another entry that I change, and then it disappears. Also the position remains correct.
But as I said, if the input to the script is another, the troubled slider remains and works as it should.
According to another thread: I do set the units before the position...
0 件のコメント
採用された回答
Adam
2017 年 6 月 14 日
Problems with sliders disappearing usually come with a warning on the command line and are often associated with setting an illegal state where the min > max or the value does not fit within the specified range.
The fact you say this happens after
set(slider,'Min',1)
indicates this is the problem if e.g. max is 0.
When you are editing the min, max and value properties of a slider it is best to edit these all in one statement as e.g.
set( slider, 'Min', 1, 'Max', 2, 'Value', 1.5 )
and ensure that the min, max and value are valid with respect to each other.
2 件のコメント
Adam
2017 年 6 月 14 日
No, setting all 3 at once will not help if they are not valid with respect to each other, but it does eliminate warnings being spewed to command line if you do them in succession and the slider is temporarily in an invalid state mid-way through.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!