Set BackgroundColor to 'none'
이전 댓글 표시
I'm receiving the following warning in code that I use liberally to auto-generate complex gui objects like a tab-panel. Warning: Setting the ColorSpec to 'none' for a uicontainer will not be allowed in a future release. Currently I set BackgroundColor to 'none' where I need an object to inherit it's parents color. Will there be replacement method to acheive this once this functionality has been removed? Setting background color to none is a useful method to distiguish between objects that inherit their parents color versus objects that at the moment just happen to have the same color.
댓글 수: 1
Walter Roberson
2011년 5월 31일
I agree with your concern; I wonder why this is being done?
답변 (1개)
Matt Fig
2011년 5월 30일
c = get(hparent,'color') % For a figure. 'backgroundcolor' for others.
set(hobj,'backgroundcolor',C)
댓글 수: 2
Nicholas Hall
2011년 5월 31일
Matt Fig
2011년 5월 31일
This is the only workaround I know of without going to the Java. I know it is not ideal for all purposes, but at least this can be put into all code which changes the parent's color, after the change is made.
카테고리
도움말 센터 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!