From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: dialog boxes Date: Fri, 10 Sep 2004 15:05:33 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1094854190 30403 80.91.224.253 (10 Sep 2004 22:09:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Sep 2004 22:09:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 11 00:09:44 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C5taS-0002Os-00 for ; Sat, 11 Sep 2004 00:09:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5tfq-0006lZ-Od for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Sep 2004 18:15:18 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 10 Sep 2004 17:05:34 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:XXZ7YLNa0n/3x92nWV1cCxS+Qv0= Original-Lines: 37 Original-NNTP-Posting-Host: 24.18.253.35 Original-X-Trace: sv3-QNssPYMRwZ3XXx7Yk+nVE2S0Op5Tpv9+8J6F2+QWQVzz+y7qiLz19RwvZs0JIOZoOZRNZ6cBebUZqJq!PSgpRtpIJMI0nUiaFyBFLfbK+31zRW8SL0ZauXLx/FjgMnWHdh1CTrkl Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.13 Original-Xref: shelby.stanford.edu gnu.emacs.help:125255 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20610 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20610 Bruce Ingalls 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)) ( )) 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