A) <Listbox> vs <Scroll-Listbox>

From: Jong-Won Choi <jwchoi_at_gsenl5.gsen.goldstar.co.kr>
Date: Wed Jan 3 17:25:53 1996

Hi STkloser,

I solved one of my previous problem like this:

----------------------------------------------------------------
;;; Start of actual translation of the book pp.170 of Tcl/Tk book
(let ((top (make <Toplevel>)))
  (let ((colors (make <Listbox> :parent top))
        (in-port (open-input-file "/usr/lib/X11/rgb.dir")))
    (read-line in-port) ; Skip top-line
    (do ((str-line (read-line in-port) (read-line in-port)))
        ((eof-object? str-line))
        (insert colors "end" (my-get-field str-line 4)))
    (close-input-port in-port)
    (bind colors "<Double-Button-1>" `(set! (background ,(address-of colors))
                                            (selection 'get)))
    (pack colors)))

;;; another simple extension - scroll-listbox

(let ((top (make <Toplevel>)))
  (let ((colors (make <Scroll-Listbox> :parent top))
        (in-port (open-input-file "/usr/lib/X11/rgb.dir")))
;;; Now add listbox
    (let ((listbox (listbox-of colors)))
      (read-line in-port) ; Skip top-line
      (do ((str-line (read-line in-port) (read-line in-port)))
          ((eof-object? str-line))
          (insert listbox "end" (my-get-field str-line 4)))
      (close-input-port in-port)
      (bind listbox "<Double-Button-1>" `(set! (background ,(address-of colors))
                                            (selection 'get)))
    (pack colors))))
------------------------------------------------

But, I have no idea yet my previous "Q) Frame's Relief keyword"


Happy New Year!

Jong-Won Choi

=======================++=====================================
 R&D DA DEVELOPMENT ||
     DM TEAM ||
 LG Semicon Co., Ltd. || Direct: +82 (2)526-4052
 16, Woomyeon-dong, || Fax: +82 (2)526-4136
 Seocho-gu, Seoul, || email: jwchoi_at_gsen.goldstar.co.kr
 137-140, Korea. ||
=======================++=====================================
Received on Wed Jan 03 1996 - 17:25:53 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST