We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
widget_set_auto_adjust_size(label, TRUE); widget_set_tr_text(label, text); label_resize_to_content(label,0,0xffff,0,0xffff); h = widget_get_prop_int(label, WIDGET_PROP_H, 0); 大致代码如上,当我设置label控件的文本比较长时,实际显示是有换行显示的,但是获取label的h却还是xml文件里面的h高度。 有开启auto_adjust_size属性后,label的h不是会改变的吗,那通过widget_get_prop_int(label, WIDGET_PROP_H, 0)函数怎么拿不到改变后的h。怎么才能拿到根据文本内容长度所改变后的label的高度h。
The text was updated successfully, but these errors were encountered:
设置max_w属性试试
Sorry, something went wrong.
No branches or pull requests
widget_set_auto_adjust_size(label, TRUE);
widget_set_tr_text(label, text);
label_resize_to_content(label,0,0xffff,0,0xffff);
h = widget_get_prop_int(label, WIDGET_PROP_H, 0);
大致代码如上,当我设置label控件的文本比较长时,实际显示是有换行显示的,但是获取label的h却还是xml文件里面的h高度。
有开启auto_adjust_size属性后,label的h不是会改变的吗,那通过widget_get_prop_int(label, WIDGET_PROP_H, 0)函数怎么拿不到改变后的h。怎么才能拿到根据文本内容长度所改变后的label的高度h。
The text was updated successfully, but these errors were encountered: