Re: [PythonReports-users] Font and Style use and how they are shown in lists
Brought to you by:
a1s
From: Werner F. B. <wer...@fr...> - 2012-12-22 08:47:17
|
On 22/12/2012 08:39, alexander smishlajev wrote: > On 21.12.2012 20:16, Werner F. Bruhin wrote: >> Attached a patch to show fonts in the list as e.g.: >> >> body (8biu:Arial) >> >> and styles in the list as e.g.: >> >> style 2 - body > Thank you. > > I have a question: may the computation of list titles be done by the > values themselves? ListPropertyDialog does not seem to be the right > place for this. I had tried to do it in class ListElement and replace how self.name is generated in there, but I hit a wall in not being able to figure out how to get at the attributes value (shows my lack of Python knowhow:-( ). How do I get at if bold is true or false? attributes['bold'] (<class 'PythonReports.datatypes.Boolean'>, <Boolean: false>) And how to get at the typeface name at that point? attributes['typeface'] (<class 'PythonReports.datatypes.String'>, <PythonReports.datatypes.REQUIRED object at 0x05D0CF70>) Werner |