ControlTextBox boundaries
#1
Hello,

Is there a way or a trick to see visually the boundaries of a ControlTextBox that I created using xbmcgui module?

I think textbox would look much better with boundaries in my addon.


Thanks
Reply
#2
IIRC ControlTextBox doesn't have any textures. But since xbmcgui.Controls can overlap, you can add some background with ControlImage. Also, Dialog().textviewer was added in Krypton.
Reply
#3
(2017-04-20, 19:50)Roman_V_M Wrote: IIRC ControlTextBox doesn't have any textures. But since xbmcgui.Controls can overlap, you can add some background with ControlImage. Also, Dialog().textviewer was added in Krypton.

Thank you. That was helpful.

I'm now facing another question about scrolling the TextBox.

Can you enlighten my eyes about how do I scroll the ControlTextBox?

The TextBox contains text that accumulates, I want to scroll down so I can always see the bottom of the TextBox in order to see the latest things.

I tried this and it doesn't seem to do something:

self.textbox = xbmcgui.ControlTextBox(0, 0, 1200, 200, textColor='0xFFFFFFFF')
self.addControl(self.textbox)
self.textbox.setText('long text for example...\n\n\n\n\n...')
self.textbox.scroll(150) # different numbers that I tried here didn't change anything


Thanks.
Reply
#4
(2017-04-26, 20:49)yarin.levy2 Wrote:
(2017-04-20, 19:50)Roman_V_M Wrote: IIRC ControlTextBox doesn't have any textures. But since xbmcgui.Controls can overlap, you can add some background with ControlImage. Also, Dialog().textviewer was added in Krypton.

Thank you. That was helpful.

I'm now facing another question about scrolling the TextBox.

Can you enlighten my eyes about how do I scroll the ControlTextBox?

The TextBox contains text that accumulates, I want to scroll down so I can always see the bottom of the TextBox in order to see the latest things.

I tried this and it doesn't seem to do something:

self.textbox = xbmcgui.ControlTextBox(0, 0, 1200, 200, textColor='0xFFFFFFFF')
self.addControl(self.textbox)
self.textbox.setText('long text for example...\n\n\n\n\n...')
self.textbox.scroll(150) # different numbers that I tried here didn't change anything


Thanks.

Set
Code:
autoScroll(delay, time, repeat)
https://codedocs.xyz/xbmc/xbmc/group__py...7d2c3c757b
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#5
(2017-04-26, 21:19)Lunatixz Wrote: Set
Code:
autoScroll(delay, time, repeat)
https://codedocs.xyz/xbmc/xbmc/group__py...7d2c3c757b


I know autoScroll and it works great.
I will try to use it in order to see the latest text... maybe minimum Scroll time and long Scroll delay.

Thank you
Reply

Logout Mark Read Team Forum Stats Members Help
ControlTextBox boundaries0