简体   繁体   中英

My text size of a label won't change in kivy

I'm trying to add a label widget to my kv file but the text size won't change, as I understand it I think that the actual label size is changing because the label position should be at the bottom of the screen but it's in the middle of the screen when I run the script.

<LeftArea@FloatLayout>:


    Label:
        text: 'Search Term: '
        text_size: 200, 200
        size: 200, 200
        pos_hint: {'bottom': 1, 'left': 1}

在此处输入图片说明

OK, I fixed it, I just used markup text

Label:
    markup: True
    text: '[size=20]Search Term: [/size]'

I still don't understand why my original code doesn't work if anyone can explain because I only followed the kivy docs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM