Hi,
You can't use Wx::ColourDatabase directly if it isn't in Wx.
However, if you just want to use the predefined colours in Wx::ColourDatabase,
you can do so directly as in
my $colour = Wx::Colour->new("GOLD");
You can create any colour you want in the Wx::Colour constructor.
Regards
Mark
Daniel wrote:
>>The error you are getting suggests either your version of Wx does not
> have Wx::ColourDatabase, or you need to
> use Wx;
>
> <http://dict.leo.org/ende?lp=ende&p=eL4jU.&search=I>I agree with that.
>
>>Either way, once you have Wx::ColourDatabase compiled + you use Wx, then
>>my $colour = Wx::ColourDatabase::Find("GOLD");
>
> I didn't wanted to learn how to compile Wx Components just for having a
> golden background in ListCtrl. Is there no easier way doing this?
>
> Regards
> Daniel
>
>
> Daniel wrote:
>> Hi,
>>
>> within ListCtrl and other objects you can use predefined
> wxColour-Values, but this are only a few:
>>
>> wxBLACK
>>
>>
>> wxWHITE
>>
>>
>> wxRED
>>
>>
>> wxBLUE
>>
>>
>> wxGREEN
>>
>>
>> wxCYAN
>>
>>
>> wxLIGHT_GREY
>>
>>
>> In wxColourDatabase are much more defined. How can I use one of that?
> I tried
>>
>> $panel->{ListCtrl}{"list"} -> SetItemBackgroundColour( 1,
> Wx::ColourDatabase->Find("GOLD"));
>>
>> but this returns:
>> Can't locate object method "Find" via package "Wx::ColourDatabase"
>>
>> So I placed this in my code:
>>
>> use Wx::ColourDatabase;
>>
>> And got:
>>
>> Can't locate Wx/ColourDatabase.pm in @INC (@INC contains: C:/Perl/lib
> C:/Perl/site/lib .)
>>
>>
>> So please tell me what I'm doing wrong.
>>
>> Regards Daniel
>>
>>
>>
>>
>>
>> Heute schon einen Blick in die Zukunft von E-Mails wagen?
> www.yahoo.de/mail <http://www.yahoo.de/mail>
>
>
>
>
> ------------------------------------------------------------------------
> *Ihre erste Baustelle?* Wissenswertes für Bastler und Hobby Handwerker.
> <http://de.rd.yahoo.com/evt=48734/*http://de.answers.yahoo.com/dir/;_ylc=X3oDMTEzY2IyNmI0BF9TAzIxMTQ3MTgzMjIEc2VjA01haWwEc2xrA3RhZ2xpbmVz?link=list&sid=396545394>