Scrollabel label is limited in text?

47 views Asked by At

sorry to bother you. I have recently started devolping in Kivy and i am trying to show a scrollable text file in a window. The text comes from a .txt file, and a use the id of the label to put the string obtained from the file into the text field in the Label. The problem i am having is that, althouugh kivy documentation firmely states that the label has no lines limit (by default), when i pass a certain number the text starts to be showed all in black as the picture i will attached. Before adding one more line to the .txt, the text can be read just fine but after adding the line the problem starts.

After adding the line

Before adding the line

Here is my code, the id of the label i am having troubles with is called "documento". Can some please tell me if there is some error in my label configuration or something else?

from kivy.lang import Builder

Builder.load_string('''


<RootWidget>:
    canvas.before:
    Color:
        rgba: 1, 1, 1, 1
    Rectangle:
        pos: self.pos
        size: self.size

color: (0, 0, 0, 1.0)
background_color: (255, 255, 255, 1.0)
carousel: carousel

Carousel:
    on_index: root.on_index(*args)
    id: carousel
    ignore_perpendicular_swipes: True
    FloatLayout:
        id: tab1
        Label:
            id: identification    
            text: ''
            markup: True
            color: (0, 0, 0, 1.0)
            halign: 'left'
            valign: 'top'
            font_size: '18pt'
            x: 100
            y: -80
            opacity: 0

        Image:
            id: avatar
            source: 'assets/avatar.png'
            keep_ratio: True
            size_hint_x: 0.3
            x: 60
            y: -70
            opacity: 0

        Image:
            id: banner
            source: 'assets/banner.png'
            keep_ratio: True
            size_hint_x: 1
            x: 0
            y: 160
            opacity: 0

        Image:
            id: lock
            source: 'assets/lock.png'


    FloatLayout:
        id: tab2
        Label:
            id: asunto    
            text: 'Asunto: [b] Expdte. 234/98634987/54[/b]'
            markup: True
            color: (0, 0, 0, 1.0)
            halign: 'left'
            valign: 'top'
            font_size: '18pt'
            x: 40
            y: 170
            opacity: 0

        Image:
            id: votacion
            size_hint_x: 0.2
            x: 20
            y: 80
            opacity: 1

        Label:
            id: voto_text    
            text: '[b]VOTO POSITIVO[/b]'
            markup: True
            color: (0, 0, 0, 1.0)
            halign: 'left'
            valign: 'top'
            font_size: '40pt'
            y: 90
            x: 40
            opacity: 1

        Image:
            id: biometric_icon
            source: 'assets/biometric.png'
            keep_ratio: False
            size_hint_x: 0.2
            y: -90
            x: 320
            opacity: 1

        Label:
            id: confirm_label    
            text: 'CONFIRMACI\xc3\x93N BIOM\xc3\x89TRICA'
            markup: True
            color: (0, 0, 0, 1.0)
            halign: 'center'
            valign: 'top'
            font_size: '10pt'
            y: -190
            x: 00
            opacity: 1

    FloatLayout:
        id: tab3
        ScrollView:
            on_scroll_start: print("arranque")
            on_scroll_move: print("me muevo")
            on_scroll_stop: print("pare")
            Label:
                id: documento
                text_size:700, None
                size_hint_y: None
                height: self.texture_size[1]
                color: (0, 0, 0, 1.0)

    Label:
        id: debugger
        text: ''
        color: (0, 0, 0, 1.0)
        halign: 'left'
        valign: 'top'
        width: 200



 ''')
1

There are 1 answers

0
JBeloqui On

I continue my search for a solution to this problem only to discover there was a limitation in my gpu for rendering the text, so the problem was that. So to sum-up and help everyone who is having the same problem, the limitation is not from kivy but from the gpu