An approximation in J7 GTK. gtk initialization not included therefore
cannot run in jconsole.

NB. test image
coinsert 'jgtk'

testimg_run=: 3 : 0
window=: gtk_window_new GTK_WINDOW_TOPLEVEL
mydata=: gtk_image_new ''
gtk_widget_set_size_request mydata,120 120
gtk_container_set_border_width window,12
gtk_container_add window,mydata
NB. initialize form here
gtk_image_set_from_file mydata;jpath '~/a001.jpg'
gtk_widget_show_all window
)

testimg_run''

Втр, 11 Янв 2011, David Mitchell писал(а):
> Here is a brief example of how I got an image in a J form:
> 
> NB. test image
> require 'media/platimg gl2'
> coinsert 'jgl2'
> 
> 
> TESTIMG=: 0 : 0
> pc testimg;
> xywh 0 0 60 60;cc mydata isigraph;
> pas 6 6;pcenter;
> rem form end;
> )
> 
> testimg_run=: 3 : 0
> wd TESTIMG
> NB. initialize form here
> 'mydata' glimg jpath '~user\projects\Grapics\P7310004.JPG'
> wd 'pshow;'
> )
> 
> testimg_close=: 3 : 0
> wd'pclose'
> )
> 
> This only works in J6, not in J7.  There are examples of image use for J7 in 
> the 
> GTK demos, as Björn noted.
> --
> On 1/11/2011 5:45, Gian Medri wrote:
> > *I am very new at J, but I have used APL  many years. I develop programs as
> > a help to dyslectic pupils as well as to those who have difficulties in
> > learning mathematics. In this contest  pictures and sound are essential.
> >
> > 1) How do I get a picture (bmp or others) as a background in a form or as an
> > image? I tried with (wd ' set isipicture filename'), without success . wd
> > commands documentation is not complete  and there is not example in the Labs
> > or Demos.
> >
> > 2)**How do I get a sound from a wav file or others format?
> >
> > 3)Normally I have programs that works with 2 or 3 languages.
> > I can change the language in buttons and other controls but not in the
> > menus.
> >
> >
> > Many thanks in advance.
> >
> > Gian*
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to