Hello,
Recently i've spent some time developing on the User interface of my application.
In an attempt to make the icons and buttons look better i've used the BTN_97 features that can make a bitmap change image when the mouse goes over it.
I got this to work, but now i face a new problem. When clicking on the bitmap it doesn't do anything, and since its not a button, i can't call an CLICK event on it.
I've tried to use OMNIEVENT on the form but can't get anything to work.
And if you have many bitmaps (acting as buttons), how would you use OMNIEVENT.
Any help would be VERY greatly appreciated.
Atef,
You need to use the window's BUTTONDOWN event and track the location of the mouseclick to determine which "button" was clicked on.
Atef
Is this ths BTN_97 that is provided with SLIST_97?
World Leaders in all things RevSoft
In fact aren't you in Oz? Thought the name was familiar! We left some written instructions on the use of BTN_97 after the training course. Did you mislay them?
World Leaders in all things RevSoft
It is the BTN_97 that is provided with SLIST_97, but we only have the exe, not the source code
really? would that be using a script?
Hello,
I have the documentation you left with us. I used it to get the mouse over feature working.
But it doesn't say anything about how to get the bitmaps to do something when you click on them. And it doesn't mention how to use this feature with many bitmaps on the form. I have around 10 bitmaps on my form, all of which need the mouse over feature (which i have working ), and all that launch a new form when you click on them.
The documentation you left doesn't cover this.
It only says "This invokes the Window's OMNIEVENT with a message of Click and Param1 set to the name of the clicked bitton."
My email is [email protected]
Thank you in advance
Please email [email protected] and we will re-email you the Btn97 dcoumentation from the training course.
World Leaders in all things RevSoft
Precisely - so when the button is clicked, the OMNIEVENT handler will be invoked, it will be passed the message CLICK and it will be passed the name of the Button that caused the click. You as the programmer can then say "Oh look there's been a click and it was the 7th button 'LAUNCH_SALES_RECORDING' and you can launch the Sales Recording window.
All you have to do is write the OMNIEVENT handler for the window.
World Leaders in all things RevSoft
I will email in case u can send me extra doucmentation, but i have the documentation you left with us. I used it to get the mouse over feature working.
But it doesn't say anything about how to get the bitmaps to do something when you click on them. And it doesn't mention how to use this feature with many bitmaps on the form. I have around 10 bitmaps on my form, all of which need the mouse over feature (which i have working ), and all that launch a new form when you click on them.
The documentation you left doesn't cover this.
It only says "This invokes the Window's OMNIEVENT with a message of Click and Param1 set to the name of the clicked bitton."
My email is [email protected]
Thank you in advance
Atef,
Script or quickevent. Doesn't matter. Both will work. Myself I use quickevents.
The xDown and yDown parameters tell your handler where in the window's client area the user clicked. Your handler must check these coordinates against the coordinates of the various clickable bitmap controls you've got.
Say you got four bitmap controls called EENY, MEENY, MINY, and MO. Then your handler could do something like this:
Eeny_Size=Get_Property( @Window : ".EENY", "SIZE" )
Meeny_Size=Get_Property( @Window : ".MEENY", "SIZE" )
Miny_Size=Get_Property( @Window : ".MINY", "SIZE" )
Mo_Size=Get_Property( @Window : ".MO", "SIZE" )
begin case
/* EENY was clicked */
… do stuff …
/* MEENY was clicked */
… do stuff …
/* MINY was clicked */
… do stuff …
/* MO was clicked */
… do stuff …
case true$
Clicked_Ctrl="
end case
…
(You can of course make your programming more elegant, general and flexible by naming your bitmap controls in a systematic way, like BITMAP1, BITMAP2, etc.)
- Oystein -
Atef,
Hope I didn't confuse you too much with my response. I hadn't read the whole thread. Not that I think I said anything wrong in itself. But you might want to stick to with the Sprezzatura way of doing it.
- Oystein -