10-25-2002 06:12 AM
10-25-2002 06:59 AM
08-23-2005 06:33 AM
I think there was something lost when the forums were migrated. At least i don't get any results when I press the comma and then the M 🙂
I would like to be able to move title-bar-less child panels around, so if anyone has any ideas 🙂
Regards,
Erwin Timmerman
08-23-2005 09:00 AM
07-13-2010 04:53 PM - edited 07-13-2010 04:54 PM
How is it possible to move the panel with holding down the mouse on an object? (i.e. I want to make my own custom titlebar on top of the program and have the panel-moving option while the mouse left key is held down)
07-16-2010 11:30 AM
Arash:
If I understand your question correctly, you want to replace the built-in title bar with a custom bar, and you want to be able to move your panel by clicking and dragging on your custom bar.
Take a look at the attached sample. I set the panel attribute Title Bar Visible to false. I added a picture at the top of the panel as the new title bar. I used mouse events to know when the title bar is clicked on, when the mouse is moved, and when the mouse button is released. I move the panel when the title bar is clicked and dragged.
I used the "obsolete" extended mouse events to allow the mouse event EVENT_LEFT_MOUSE_UP to be trapped even if the mouse moves off the panel.
Using the new built in event EVENT_LEFT_CLICK_UP, if the mouse is moved fast enough to move off the panel before the panel is moved to it, EVENT_LEFT_CLICK_UP is not seen. Since, in my sample, I use the event generated by releasing the mouse button to know when to stop moving the panel, if EVENT_LEFT_CLICK_UP is missed because the mouse was moved so fast that it was temporarily off the panel, the panel keeps moving even after the mouse button is released.
I tested it in CVI 6.0 and 9.0.1.
07-16-2010 01:02 PM
This was a great response. It worked and thank you very much for the source code
10-12-2012 06:50 PM
Hi,
Just what I want, though when I incorporated the code, I am not detecting EVENT_MOUSE_MOVE.
I tried to run the demonstration code.
This compiles OK when when I run it, I get the error
Library function error .... The format of the file is newer than this version of CVI
I am using CVI 6.0
Is it possible to post a version that operates under CVI 6.0 please?
10-14-2012 01:50 PM
Belay that request, I have sorted it
I created my own uir file (under CVI 6.0) and then discovered that I had forgotten the call EnableExtendedMouseEvents(...)