Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Tableview and attributes set with UI Editor issue
-
If I set font sizes in UI Editor for Tableview:
https://dl.dropboxusercontent.com/u/2769367/image.jpgIt doesn't end up applying:
https://dl.dropboxusercontent.com/u/2769367/image1.jpgSame if I set it manually with the ListDataSource.font
Ideas?
-
Hmm, I can't reproduce this here. Could you show your code? Perhaps you're re-assigning the data source somewhere?
-
https://gist.github.com/PyDann/2f5685e47f28f867d1c6
I remember somewhere... Docs or forum post about not putting references to UI elements in the UI class init, which is where my font setting is. Even at that, I still changed the font size in the UI editor and nothing changed.
-
Well, you're creating a new data source in your
__init__
method, so anything that you configured in the UI file won't have an effect, as you're replacing it entirely. -
However, I manually set <code> ui.ListDataSource.font = ('<system>', 10)
-
You should set
self.listsource.font
(ui.ListDataSource
is the class, not your object). -
You want self.listsource.font, not ui.ListDataSource.font!
-
Completely misunderstood I was creating a new class. I think I get it now. Spent the last 30min reading over documentation and tinkering to get it.