Click Event for Static Text Control (OpenInsight 32-Bit)
At 03 DEC 2002 04:59:11PM Eric Hilder wrote:
I can see in the EventDesigner that the Static Text control has Submit and WinMsg events currently. I want to add a click event to Static Text controls as well. I have been able to do this in the Event Designer. How do I program the event in Form Designer though? The Static Text control does not even allow you to code the Submit and WinMsg controls. How then can I capture a Click event and process it programatically?
Eric H. Hilder
Medical Data Technologies
At 03 DEC 2002 06:11PM Oystein Reigem wrote:
Eric,
I have a window where I handle clicks on a bitmap. I just use the BUTTONUP or BUTTONDOWN event of the window itself. I think you can do exactly the same for statics. But your handler must find out what it was that was clicked - which bitmap or static or if it was the window background itself. It does that by looking at the coordinates in the BUTTONUP/BUTTONDOWN parameters and compares with the coordinates of the relevant controls (SIZE property).
- Oystein -
At 04 DEC 2002 01:29PM [email protected] wrote:
If you ctrl-dclick you will get to the event editor
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 971-570-2005
OS: Win2k sp2 (5.00.2195)
OI: 4.1.2
At 04 DEC 2002 01:33PM Donald Bakke wrote:
Yep, but it still doesn't capture the event. From what I've seen there is no easy way to capture click or any other type of mouse events with static text controls. I suspect Eric is trying to simulate a hyperlink control based on his previous posts. The best bet is to do what Oystein has done with his bitmap controls and to drap the BUTTONDOWN event of the window and use the x and y coordinates to see if the mouse was actually over the static text control(s).
At 04 DEC 2002 01:42PM [email protected] wrote:
doesn't work .. really .. wow that isn't very handy.
I remember that it was the only way to see the events for the label .. just played with them and you are 100% correct (how could i have doubted ).
RTI .. IF you are listening .. Why doesn't this get surfaced? I did a quick test on winmsg and it didn't seem to respond either .. (though admittedly a quick test).
Is this a windows limitation or presentation server limitation?
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 971-570-2005
OS: Win2k sp2 (5.00.2195)
OI: 4.1.2
At 04 DEC 2002 02:37PM Don Miller - C3 Inc. wrote:
Don't know the answer to the question. I did it by converting static text to a .BMP and then used a pushbutton/bitmap item. I was also able to enable balloon help this way for static text, too.
Don M.
At 04 DEC 2002 02:41PM Mike Ruane wrote:
Have you tried qualifying the events on the Form's create event?
At 04 DEC 2002 03:11PM Oystein Reigem wrote:
DSig,
You might be right about WINMSG. The comments and out-commented statements in my source tell me I first tried WINMSG with my bitmaps but didn't get it to work. Then I successfully used BUTTONUP for a while until I got a problem with spurious doubleclicks getting through from an above-laying window. Or something like that. Then I changed to BUTTONDOWN.
- Oystein -
At 04 DEC 2002 03:43PM Oystein Reigem wrote:
Don,
I agree that statics implemented as PUSHBMPS can be a good solution.
But bitmap based solutions have their limitations.
Like if you later need to change something - the text, the font, or the colour - you have to make a new bitmap.
And bitmap based solutions can be useless if the static isn't really static - if the program needs to be able to change the text to many different values, or a value that can't be predicted beforehand.
- Oystein -
At 04 DEC 2002 03:59PM [email protected] wrote:
yep ..
[email protected] onmouseover=window.status=the new revelation technology .. a refreshing change;return(true)"
David Tod Sigafoos ~ SigSolutions
Phone: 971-570-2005
OS: Win2k sp2 (5.00.2195)
OI: 4.1.2
At 04 DEC 2002 08:08PM Donald Bakke wrote:
Mike,
Have you tried qualifying the events on the Form's create event?
You may not remember but shortly before or after you took over Revelation I posted this exact problem. Static Text and Bitmap controls cannot be qualified in this way. We've resorted to using BUTTONDOWN events and/or simply qualifying @Window by itself and tracking where the mouse and/or click occurs on the form.
With the advent of OLE controls this is much less important to us but it would still be nice to have if it is a possibility.
At 05 DEC 2002 03:52AM Oystein Reigem wrote:
Don,
Just a thought: Can one use a border-less, read-only edit line or edit box instead of a static? I know edit lines and boxes don't have CLICK events either, but perhaps they can be qualified?
- Oystein -
At 05 DEC 2002 08:54AM Don Miller - C3 Inc. wrote:
Oystein ..
Yes, you can qualify those. I played around with putting a double-click event on an Editline that was read-only and it worked. Used it to call a selection procedure (code that ultimately called a Pop-Up). Worked OK. I forgot about it when I first read this thread. Probably a brain-fart.
Don M.
At 05 DEC 2002 11:33AM Donald Bakke wrote:
Oystein / Don M.,
But borderless editlines still have a border, just a less noticable one.
At 05 DEC 2002 12:01PM Oystein Reigem wrote:
Don,
Nice.
Now I wonder what Eric's decided to do. Do you think we scared him off?
![]()
- Oystein -
At 05 DEC 2002 12:17PM Oystein Reigem wrote:
Don,
Then what about a border-less, grid-less, header-less, row button-less, one-row, one-column edit table?
![]()
![]()
![]()
- Oystein -
At 05 DEC 2002 12:47PM Donald Bakke wrote:
Oystein,
But didn't you just post that a one-row edittable doesn't work in 4.1.2?
![]()
At 05 DEC 2002 01:51PM Oystein Reigem wrote:
Don,
Just trying to coax you into looking at the problem.
![]()
- Oystein -
At 05 DEC 2002 03:31PM Eric Hilder wrote:
Thanks for all the feedback everyone! I've been experimenting with all your suggestions and have decided to go with the BUTTONDOWN window event. That seems to be the easiest to program.
Eric