There is an example of using grids on a form at:
http://groups.google.com/group/j-programming/browse_thread/thread/22d3c6d5d516491e# You get the scripts at: http://groups.google.com/group/j-programming/files DATA=: 6 3$300+i.36 load 'grid' grid DATA In the threegrids.ijs window after you run the window you can type DATA and it will replace the data in the grid above. 2010/3/12 Donald Pittenger <[email protected]>: > Yesterday I posted that I was having trouble placing a grid on a > form. But it seems that I could not attach my test scrip. > > That script is pasted below, and indicates where I'd like like to try > placing a grid. Recall that I was unable to display data and was > unsure at what point to create new locales. (The sample scripts in > the Wiki are ambiguous regarding data naming, showing the same name > in both caps and lower case in the same application, but no code > indicating where the l/c variable was created.) > > * * * * * > > NB. Main form and child forms test script. > NB. > NB. MainProg > NB. > NB. MainForm > NB. MainFrm_newform0_button > NB. MainFrm_quit_button > NB. > NB. NewForm0 > NB. NewFrm0_quit_button > NB. > NB. > ======================================================================== > == > > > require 'files' > require 'format' > require 'convert' > require 'strings' > require 'gl2' > require '/Users/dbpitt/Consulting/OFM Forecasting/Estimates - > research/J6 Programs - Mac/Utilities/graphstuff.ijs' > require 'jzgrid' > require 'jzgrid numeric pack' > coinsert 'jgl2' NB. << Needed for running in J602 >> > > > NB. > ------------------------------------------------------------------------ > -- > NB. MainProg *** Base from which pop-up forms are created. > NB. > NB. > ------------------------------------------------------------------------ > -- > MainProg=: 3 : 0 > > PATHBASE=: '/Users/dbpitt/Consulting/OFM Forecasting/Estimates - > research/' > PATHBASE=: PATHBASE,'Analytical input data/' > bloc=. 2}.clipunfmt fread PATHBASE,'USPS data//USPS occupancy > percents.txt' > mat=. ({.bloc),2}.6{.bloc > matpart=. (<a:;i.5){mat > DATA=: 6 3$300+i.36 > > wd MainForm > wd 'pshow' > ) > > > NB. > ======================================================================== > == > > > NB. > ------------------------------------------------------------------------ > -- > NB. > NB. > ------------------------------------------------------------------------ > -- > MainForm=: 0 : 0 > > pc MainFrm closeok; > pn "GUI form features test"; > > xywh 10 10 200 50;cc frame staticbox ss_blackframe; > > xywh 15 215 40 10;cc newform0 button;setfont newform0 "Arial" 9 > bold;cn "New Form"; > > xywh 360 215 30 10;cc quit button;setfont quit "Arial" 9 bold;cn "Quit"; > > > pmove 120 100 400 250; > > rem *** full screen = pmove 0 0 640 500; > ) > > > NB. > ------------------------------------------------------------------------ > -- > NB. > NB. > ------------------------------------------------------------------------ > -- > MainFrm_newform0_button=: 3 : 0 > > wd NewForm0 > wd 'psel NewFrm0' > > NB. <<< Grid creation, fill code here??? >> > > wd 'pshow' > ) > > > NB. > ------------------------------------------------------------------------ > -- > NB. > NB. > ------------------------------------------------------------------------ > -- > MainFrm_quit_button=: 3 : 0 > > wd 'pclose' > ) > > > NB. > ======================================================================== > == > NB. > NB. > ------------------------------------------------------------------------ > -- > NewForm0=: 0 : 0 > > pc NewFrm0 closeok; > pn "Sub-form number 0"; > xywh 20 20 100 150;cc testgrid isigraph rightmove bottommove; > xywh 160 50 30 10;cc quit button;setfont quit "Arial" 9 bold;cn "Quit"; > > pmove 150 50 200 200; > ) > > > NB. > ------------------------------------------------------------------------ > -- > NB. > NB. > ------------------------------------------------------------------------ > -- > NewFrm0_quit_button=: 3 : 0 > > wd 'pclose' > ) > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Björn Helgason, Verkfræðingur Fornustekkum II 781 Hornafirði, t-póst: [email protected] gsm: +3546985532 sími: +3544781286 http://groups.google.com/group/J-Programming Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans góður kennari getur stigið á tær án þess að glansinn fari af skónum /|_ .-----------------------------------. ,' .\ / | Með léttri lund verður | ,--' _,' | Dagurinn í dag | / / | Enn betri en gærdagurinn | ( -. | `-----------------------------------' | ) | (\_ _/) (`-. '--.) (='.'=) ♖♘♗♕♔♙ `. )----' (")_(") ☃☠ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
