newLISP Fan Club

Forum => newLISP Graphics & Sound => Topic started by: Pirr on January 23, 2010, 07:46:15 AM

Title: DBGrid?
Post by: Pirr on January 23, 2010, 07:46:15 AM
Prompt as to display the tables (database) in GUI the interface?
Title: Re: DBGrid?
Post by: cormullion on January 23, 2010, 09:50:43 AM
HI there! Not sure what you're asking here. If you're asking " How do I display a grid or table in the newLISP-GS GUI", then it's quite simple. You draw a grid, then put things in each grid cell. Here, I'm adding a text string to each cell:


(load "/usr/share/newlisp/guiserver.lsp")

(set 'grid-rows 10 'grid-columns 10)

(gs:init)
(gs:frame 'Grid 100 100 900 900 "Grid")
(gs:set-grid-layout 'Grid grid-rows grid-columns 2 2)

(dotimes (row grid-rows)
   (dotimes (column grid-columns)
      (gs:label  (sym (string "label" row column)) (string "R" row " C" column))
      (gs:add-to 'Grid (sym (string "label" row column)))))
     
(gs:set-visible 'Grid true)
(gs:listen)
Title: Re: DBGrid?
Post by: Pirr on January 23, 2010, 10:44:42 PM
Excuse for my English, I write through the interpreter.

I need the following: