0
윈도우 크기를 조정할 때 flex 3 구성 요소를 생성 중입니다. 라벨의 크기를 다시 지정하고 text.how를 사용하여이 작업을 수행해야합니까?flex 3 윈도우 크기를 조정할 때 라벨 및 텍스트의 크기를 조정
감사합니다.
윈도우 크기를 조정할 때 flex 3 구성 요소를 생성 중입니다. 라벨의 크기를 다시 지정하고 text.how를 사용하여이 작업을 수행해야합니까?flex 3 윈도우 크기를 조정할 때 라벨 및 텍스트의 크기를 조정
감사합니다.
너비와 높이를 퍼센트로 시도 했습니까?
<mx:Label text="This is my text" width="100%" height="100%"/>
가 지금까지 텍스트에 관한 한, 당신을 위해 here
/**
* Cheesy loop to find what should be the font size to fit the text in the inner rectangle
* This is invoked by creationComplete (or whenever you want to resize the font)
*/
private function resize():void {
var tf:TextField = lSpeech.mx_internal::getTextField();
var textFormat:flash.text.TextFormat = tf.getTextFormat();
while(tf.height > height * 0.707 && textFormat.size > 1 && labelFontSize > 1) {
textFormat.size = int(textFormat.size) - 1;
labelFontSize--;
tf.setTextFormat(textFormat);
lSpeech.validateNow();
}
// repsition the label (vertical center)
lSpeech.y = (height - tf.height)/2 - 10;
lSpeech.height = tf.height;
}
감사 사용이 트릭을 확인, 내가 해결책을 얻을하지 마십시오 VBOX 안에 내가 레이블 및 텍스트와 이미지를 넣어 이미지는 올바르게 축소되지만 텍스트와 레이블은 내 라벨과 텍스트 폭, 높이 = "100"을 축소하지 않습니다. 다른 제안 사항은 무엇입니까? – aravinda