다른 라벨 위에 라벨을 부착 할 수 있습니까? 특정 배경색의 레이블이 있고 그 위에 다른 배경색으로 두 번째 레이블을 붙이고 싶습니다.다른 라벨 위에 어떻게 라벨을 붙일 수 있습니까?
그럴 수 있습니까? 나는 smallBar를 bigBar 위에 놓고 싶습니다. 다양한 이벤트에서 smallBar의 크기를 변경하여 끊임없이 정상에 올리고 싶습니다.
public class GuessBarComposite extends Composite{
public GuessBarComposite(Composite shell, int style){
super(shell,style);
bigBar = new Label(this,SWT.NONE);
smallBar = new Label(this, SWT.NONE);
Color outOfRangeColor= new Color(Display.getDefault(), 139,0,0);
Color inRangeColor= new Color(Display.getDefault(), 255,140,0);
bigBar.setBounds(labelOffset,20,barWidth, barHeight);
bigBar.setBackground(outOfRangeColor);
smallBar.setBounds(labelOffset,20,barWidth-20, barHeight);
smallBar.setBackground(inRangeColor);
}
}
시겠습니까 :
는 단순히 그들 (y 위치의 측면에서 위쪽) 하나씩을 표시 할 경우는, 다음
GridLayout
사용 코드를 제공 하시겠습니까? 가능해야합니다. –