Rich UI TextLabel
Rich UI textLabel 위젯은 사용자가 변경할 수 없는 문자열을 표시합니다. HTML 세그먼트(예: <b>이 코드</b>)에 포함된 항목은 꺽쇠괄호를 포함하여 있는 그대로 표시되므로 이 위젯은 스팬과 다릅니다.
예를 들어 다음과 같습니다.
import com.ibm.egl.rui.widgets.Div;
import com.ibm.egl.rui.widgets.TextLabel;
import egl.ui.color;
handler MyHandler type RUIHandler{initialUI =[myDiv]}
myDiv Div{children = [myLabel01, myLabel02, myLabel03]};
myLabel01 TextLabel{text = "mix blue ", color = "blue"};
myLabel02 TextLabel{text = " and yellow ",
backgroundColor = "black",
color = "yellow"};
myLabel03 TextLabel{text = " to see green", color = "green"};
end
다음 특성이 지원됩니다.
- text는 표시할 문자열입니다.
기타 지원되는 특성과 함수는 “위젯 특성 및 함수”에서 설명됩니다.
이 위젯을 사용하려면 다음 명령문이 필요합니다.
import com.ibm.egl.rui.widgets.TextLabel;