|
From: Andy T. <an...@ha...> - 2002-02-20 07:50:56
|
My latest design dilemma is how to differentiate between enterable and
display only information in my application.
When I am fetching data into my application from a database some values
will be directly enterable by the user but others are 'reference' values
that shouldn't be changed at that time or in that place.
I'm currently putting the enterable data in TextField widgets and my
unchangeable data in StaticText widgets. But, to differentiate the
non-updateable StaticText widgets from my actual boilerplate I would
like them to be different colours.
So I started to specify all of my 'dynamic' StaticText widget with
'foregroundColor':'blue' and that works a treat. I've also played around
with them as TextField widgets and either will do. But this lead me to
another idea.
I would like to specify my colours as default values (say in a module
level variable in the .py file) which are then picked up in the resource
file. But I couldn't find a way to do it.
In the first instance I just want to be able to specify a variable
*somewhere* and reference it in my resource file, e.g.
{ ... 'foregroundColor': MYFGCOLOUR ... }
But I don't think there is any way to do this in the current framework -
or is there? Am I stuck with strings in my resource file that I have to
do a search and replace for when my fickle nature dictates a colour change?
If there is a way to do this, or we can build one into the framework we
could then provide a user configurable colour scheme, or expand it to a
full blown skinning system. Which is probably overkill but I thought I
would mention it anyway.
Regards,
Andy
--
-----------------------------------------------------------------------
From the desk of Andrew J Todd esq.
"So I curtailed my Walpoling activities, sallied forth and infiltrated
your place of purveyance to negotiate the vending of some cheesy
comestibles." - Monty Python.
|