Re: how to set initial value of a colorDialog?

Andy Todd <[email protected]> Wed, 01 Apr 2009 21:27:18 +1100
Newsgroups gmane.comp.python.pythoncard
Organization Dexter Pinion Appreciation Society
Message-ID <[email protected]>
Alec Bennett wrote:
> The title pretty much says it. I'm creating a colorDialog like this to
> allow the user to pick a color:
> 
> result = dialog.colorDialog(self)
> 
> I'd like the dialog to have a certain color preselected. Is it possible?
> 
> Thanks.
> 

In iPython I typed the following

 >>> from PythonCard.dialog import colorDialog
 >>> colorDialog?
Type:           function
Base Class:     <type 'function'>
String Form:    <function colorDialog at 0x134cc470>
Namespace:      Interactive
File: 
//usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/lib/dialogs.py
Definition:     colorDialog(parent=None, colorData=None, color=None)
Docstring:
     <no docstring>

Which tells me that you can supply two optional parameters when you 
create the dialog, one called colorData and another called color.

Regards,
Andy
-- 
 From the desk of Andrew J Todd esq - http://www.halfcooked.com/

------------------------------------------------------------------------------