AR.HFN@forsythe.stanford.edu (Hooshyar Naraghi) (09/12/90)
This is a question for Foxpro pros. I have got my copy of the program and have gotten to its mouse operation. However, how can one write a program segment to use the mouse? Let us assume we would like to define n hitable objects so that the user can click on any of them. In Foxbase+/Mac this is a straightforward code, but I could not find any reference in the Foxpro manuals. OK, I have not read the whole manual yet, so please do not shoot me yet. The ON KEY LABEL MOUSE is ok to use, but how can we write the code so that we know which object (or memory variable) was hit. Then, we can construct a CASE or IF block to take different courses of action depending on which object was hit. Thanks in advance for your replies. Hooshyar Naraghi AR.HFN@forsythe.stanford.edu
lbrintle@umaxc.weeg.uiowa.edu (Lee Brintle,Advantage,337-5200,3374010) (09/13/90)
From article <1990Sep12.025454.16163@morrow.stanford.edu>, by AR.HFN@forsythe.stanford.edu (Hooshyar Naraghi): > This is a question for Foxpro pros. I have got my copy of the program > and have gotten to its mouse operation. However, how can one write a > program segment to use the mouse? > > Let us assume we would like to define n hitable objects so that the > user can click on any of them. In Foxbase+/Mac this is a > straightforward code, but I could not find any reference in the Foxpro > manuals. OK, I have not read the whole manual yet, so please do not > shoot me yet. > Although this isn't built in, it's pretty easy to define a number of MENU PADs that contain the options. The user can click on the menu pad, choose the hot key (which you define using "/<", which isn't well documented), or (as a backup if the user doesn't have a mouse) you can TAB through the options until you get to the one that you want to change. Be warned, however, that you have to do some pretty funky stuff to the color schemes to get the pads to look good. In particular, you need to set the color pair "2" to the same colors as color pair "1", so that the pads don't stand out like a sore thumb against the background. Then you need to modify the color pair "1" so that the disabled pads look different than the enabled pads. One easy way is to take away the "+" from the foreground color is there is one, and add a "+" if there isn't one. This works well with all the color sets. Okay, it's a bit of a kludge, but it gets the job done. > > Thanks in advance for your replies. > Hooshyar Naraghi > AR.HFN@forsythe.stanford.edu Lee Brintle Advantage Information Management Iowa City, IA lbrintle@umaxc.weeg.uiowa.edu (319) 337-4010
bwdavies@rodan.acs.syr.edu (Davies) (09/13/90)
In article <1990Sep12.025454.16163@morrow.stanford.edu> AR.HFN@forsythe.stanford.edu (Hooshyar Naraghi) writes: > >The ON KEY LABEL MOUSE is ok to use, but how can we write the code >so that we know which object (or memory variable) was hit. Then, we >can construct a CASE or IF block to take different courses of action >depending on which object was hit. >Hooshyar Naraghi >AR.HFN@forsythe.stanford.edu We only have the demo at my workplace (I'm still trying to convince the higher-ups), but there is a section of code in the demo program that distinguishes between different boxes when clicked on with the mouse. ------------------------------------------------------------------------------- Sam Hill Cabal "If there's anything insidious going bwdavies@sunrise.bitnet on in the world, the media is behind bwdavies@rodan.acs.syr.edu it!" -T.J. Teru ------------------------------------------------------------------------------ -- ------------------------------------------------------------------------------- Sam Hill Cabal "If there's anything insidious going bwdavies@sunrise.bitnet on in the world, the media is behind bwdavies@rodan.acs.syr.edu it!" -T.J. Teru