LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Embedded window

Hello,
 
Is there any way to create an embedded window. By that I mean, putting one panel in another panel, using a window with scroll bars. I could create a bitmap from my sub panel and put this bitmap in a Canvas on the main panel, but this has some major disadvantages: I have to check mouseclick coordinates to determine which button is clicked, and when the button is clicked, the user does't "see" the button gets pressed. Even bigger problems come up when using drop down Rings and stuff like that...
 
All suggestions are appreciated.
 
Thanks,
Wim
0 Kudos
Message 1 of 10
(4,367 Views)

Couldn't your problem be solved by the use of child panels? A child panel resides into a parent panel, it is loaded passing the handle of the parent panel as the first parameter to LoadPanel and can programmatically be moved inside the parent panel. You can catch EVENT_SIZE in parent panel callback and move / resize accordingly the child panel.

Look at sample\userint\panels.prj for an example of those panels.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 10
(4,366 Views)

Thanks a lot for the tip Roberto Smiley Happy.

I guess I can use TOOLSLIB Scrollbars to move the controls on my child panel programatically.

0 Kudos
Message 3 of 10
(4,364 Views)
Hi Wim S!
   Can you explain more about your task?  I mean, if you want to embed a window in another window, it depends upon your application what is better to do.

   For example, ActiveX controls can be right for embedding special applications in your main project (WM player, PDF readers, and others), while if you want to embed a custom-general-purpose window, activeX controls are not staightforward, of course.

  By!

graziano

0 Kudos
Message 4 of 10
(4,360 Views)
Hello Grazanio,
 
The embedded window will contain a number of picture buttons. The user can add, remove and replace these buttons by clicking command buttons on the main panel. Since there is no limitation on how many buttons the user adds, I would like to create these buttons in an embedded panel with scroll bars, so the user can scroll this window to reach all buttons.
0 Kudos
Message 5 of 10
(4,356 Views)
OK,
   maybe activeX won't do that! (Anyway, it would be useful to check what ActiveX is available on your system)

   In your first post, you say you don't want to use rings... even a picture ring?

   Bye, and good luck!

graziano

Message 6 of 10
(4,352 Views)
OK,
   I checked my activbeX List, and I noticed an ActiveX controller "Microsoft ImageList Control", maybe this is what you was looking for!

   Robot Sad Unfortunately, On my computer I receive an ActiveX server error, when I try to use it....... (I have Win2000).

   Hope it helps!

graziano
Message 7 of 10
(4,350 Views)
I found the Microsoft ImageList Control and I'm able to import it without any errors. 
Thanks for your help,
Wim
0 Kudos
Message 8 of 10
(4,345 Views)
If you decide to go with the child panel option, you don't have to use the toolslib scroll bars. Child panels have scrollbars that you can turn on and off, and that will be a lot easier to use than the toolslib scroll bar.

Luis
Message 9 of 10
(4,318 Views)
Hi LuisG,
Thanks a lot for the tip. That will save me some work
0 Kudos
Message 10 of 10
(4,298 Views)