help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dialog boxes


From: Michael Slass
Subject: Re: dialog boxes
Date: Fri, 10 Sep 2004 15:05:33 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Bruce Ingalls <ingallsb@verizon._NO.SPAM_.net> writes:

>I discovered that I can use VBScript to enumerate available printers.
>There may even be a way to query the w32 registry via Emacs for the
>system default printer.
>
>I'd like to present users with a dialog box, to choose a printer.
>Since Emacs allows certain widgets/Windows controls in Customize
>buffers, and Emacs allows popups, can I put radio buttons and/or check
>boxes into a popup dialog box?
>
>Otherwise, some sample code, which makes it easy to populate a
>Customize buffer with options and a submit button, to act like a
>dialog box, would be appreciated.
>
>Who knows? Perhaps it will be possible to scan /etc/printcap or
>Gnome/KDE settings, to choose a printer at runtime.

At the absolute quickest and dirtiest end of the spectrum, you could
use the list you get from VB to create a list of lists, and use that
in `completing-read'.

(message "you chose printer %s"
 (completing-read
  "chose a printer: "
  (mapcar
   (lambda (elt) (list elt))
   ( <list of printers here> )) nil t))


completing-read will pop-up the "window of possibilities", which I
think you can mouse-click on to select a choice.

Not exactly what you want, but REALLY fast to implement.

-- 
Mike Slass

reply via email to

[Prev in Thread] Current Thread [Next in Thread]