-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
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
获取不到开启auto_adjust_size属性的label控件高度 #865
Comments
设置max_w属性试试 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: