[EMAIL PROTECTED] wrote:
> Let me try to explain the problem again.
> 
> Basically I want a sequential group of buttons to each 
> successively show an 
> image and then play a wav file with no intervention. I also 
> want the active 
> button show that it has the focus. This behaves as I want in j406.

Linda, I'm still not 100% I understand exactly what you want to happen,
but I have put the following together which if I'm lucky might be a step
in the right direction?

require 'bmp gl2'
coinsert 'jgl2'
dat=:256 #. [: |."1 [: [ 256 256 256 #: [: readbmp jpath

STUDY=: 0 : 0
pc study;
xywh 0 0 32 30;cc P0 button;cn "1";
xywh 33 0 32 30;cc P1 button;cn "2";
xywh 72 0 48 12;cc PAll button;cn "All";
xywh 0 33 120 120;cc g isigraph;
pas 6 6;pcenter;
rem form end;
)

study_run=: 3 : 0
wd STUDY
study_P0_button ''
wd 'pshow;'
)

study_close=: 3 : 0
wd'pclose'
)

study_P0_button=: 3 : 0
  DAT=: dat '~system\examples\data\toucan.bmp'
  study_g_paint ''
  wd 'setfocus P0;'
)

study_P1_button=: 3 : 0
  DAT=: dat '~system\examples\data\jbox.bmp'
  study_g_paint ''
  wd 'setfocus P1;'
)

study_PAll_button=: 3 : 0
 study_P0_button ''
 6!:3 (2.5)
 study_P1_button ''
)

study_g_paint=: 3 : 0
  glclear ''
  glpixels_jgl2_ (0 33,|.$DAT),,DAT
  glpaint_jgl2_ ''
)

study_run ''
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to