Rich UI TextLabel
Rich UI textLabel ウィジェットには、ユーザーが変更できないストリングが表示されます。このウィジェットは、span とは異なります。これは、HTML セグメント (<b>this code</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;