[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== BTN_97 mouse over feature (OpenInsight 32-bit Specific) ====
=== At 08 JAN 2003 07:34:11PM Atef wrote: ===
{{tag>"OpenInsight 32-bit Specific"}}
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.
----
=== At 08 JAN 2003 08:02PM Donald Bakke wrote: ===
Atef,
You need to use the window's BUTTONDOWN event and track the location of the mouseclick to determine which "button" was clicked on.
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 09 JAN 2003 01:57AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: ===
Atef
Is this ths BTN_97 that is provided with SLIST_97?
[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 09 JAN 2003 03:49AM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote: ===
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?
[url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 09 JAN 2003 05:26PM atef wrote: ===
It is the BTN_97 that is provided with SLIST_97, but we only have the exe, not the source code
----
=== At 09 JAN 2003 05:37PM atef wrote: ===
really? would that be using a script?
----
=== At 09 JAN 2003 05:48PM atef wrote: ===
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 atef.nashed@oryx.com.au
Thank you in advance
----
=== At 09 JAN 2003 05:52PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: ===
Please email support@sprezzatura.com and we will re-email you the Btn97 dcoumentation from the training course.
[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 09 JAN 2003 05:58PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: ===
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.
[url=http://www.sprezzatura.com]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 09 JAN 2003 06:00PM atef wrote: ===
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 atef.nashed@oryx.com.au
Thank you in advance
----
=== At 10 JAN 2003 03:41AM Oystein Reigem wrote: ===
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
case ((xDown ]= Eeny_Size) and (xDown + Eeny_Size)) and ((yDown ]= Eeny_Size) and (yDown + Eeny_Size))
/* EENY was clicked */
... do stuff ...
case ((xDown ]= Meeny_Size) and (xDown + Meeny_Size)) and ((yDown ]= Meeny_Size) and (yDown + Meeny_Size))
/* MEENY was clicked */
... do stuff ...
case ((xDown ]= Miny_Size) and (xDown + Miny_Size)) and ((yDown ]= Miny_Size) and (yDown + Miny_Size))
/* MINY was clicked */
... do stuff ...
case ((xDown ]= Mo_Size) and (xDown + Mo_Size)) and ((yDown ]= Mo_Size) and (yDown + Mo_Size))
/* 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 -
----
=== At 10 JAN 2003 03:49AM Oystein Reigem wrote: ===
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 -
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=082A5C6A505DC80E85256CA900032151|View this thread on the forum...]]