[R] windows common dialog for color selection in R
ripley@stats.ox.ac.uk
ripley at stats.ox.ac.uk
Tue May 21 11:12:40 CEST 2002
Perhaps I can elucidate. The `color picker' is in the glossary as
Color common dialog box
A common dialog box that displays available colors and controls that let
the user define a custom color.
and it is accessed using function ChooseColor in the comdlg32.dll.
I presume Simon wants a colour returned as an RGB value in some encoding
(R's and Windows' differing here). I think by far the easiest way to do
this is to write a small package with some C interface code along the
lines of the windlg package, and there are lots of examples in the
R source code, for example in src/gnuwin32/graphapp/dialogs.c.
On Tue, 21 May 2002, Uwe Ligges wrote:
> "Gatehouse, Simon (E&M, North Ryde)" wrote:
> >
> > Dear R users,
> > I run R on windows 2000 and windows 98
> > I am seeking opinion, or better still a code snippet, on what might be the
> > quickest, not necessarily the best or preferred way, of making the Windows
> > color selection common dialog available in R. Would it be an executable
> > called with system() or shell() or perhaps a tcltk module or have I missed
> > something obvious? I don't believe that I have the experience or time at
> > this stage to try a dynamic link as outlined in FAQ.
> > Any comments would be most welcome.
>
> I don't know what the "Windows color selection common dialog" is, but I
> guess you have to link to the appropriate windows dll.
> With system ans shell you can start programs that can be executed from
> the windows command shell as described in the help files. So if you can
> start that dialog out of the shell (and that's not a R specific
> question), you can start it from R as well.
> I wonder what you are going to do with such a dialog?
>
> Uwe Ligges
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list