LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How attach toolbars to menubar in order to


avoid that they move within a panel ?
0 Kudos
Message 1 of 6
(3,221 Views)
You can probably create a non moveable panel and attach toolbars.
0 Kudos
Message 2 of 6
(3,221 Views)
I suggest you to look at the toolbar instrument driver that ships with CVI.
You can find an interesting demo in samples\custctrl\toolbar\tooldemo.prj: just run it and look if this instrument can help you save a lot of work.
I suggest you also to look into the toolbox directory: you will find a lot of powerful and useful instruments that will pay you more times the time spent in studying them.
I'm sure all of this will help you
Roberto


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?
0 Kudos
Message 3 of 6
(3,221 Views)
I suggest you to look at the toolbar instrument driver that ships with CVI.
You can find an interesting demo in samples\custctrl\toolbar\tooldemo.prj: just run it and look if this instrument can help you save a lot of work.
I suggest you also to look into the toolbox directory: you will find a lot of powerful and useful instruments that will pay you more times the time spent in studying them.
I'm sure all of this will help you
Roberto


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?
0 Kudos
Message 4 of 6
(3,221 Views)
Thank you for your answer, but my problem
comes when in the tooldemo.uir you allow
scroll bars for the panel, then the toolbar
will move when you move the scrollbar.
That is my major problem.
0 Kudos
Message 5 of 6
(3,221 Views)
Arno:

A common problem that programmer's have with the LabWindows/CVI Custom Toolbar Control is that, if the panel is set to scale contents on resize, then the toolbar can grow to a huge size when the window is maximized. Commonly a programmer will want this behavior for the controls on this panel, but he'll want his toolbar to keep it's original size, like the menu bars do.

You can achieve this by setting an attribute (TOOLBAR_ATTR_AUTO_SCALING) in the Toolbar Instrument Driver with the Toolbar_SetAttribute() function. Incidentally, there's a number of other attributes, like, TOOLBAR_ATTR_STYLE, TOOLBAR_ATTR_SCALING_FACTOR, TOOLBAR_ATTR_LOCK_TOP_WHEN_SCALING, TOOLBAR_ATTR_LOCK_LEFT_WHEN_SCALING, TOOLBAR_ATTR_MIN_HEIGHT, and TOOLBAR_ATTR_MAX_HEIGHT that you might b
e interested in. You can read about what each of these attributes do by right-clicking on the "Toolbar Attribute" argument in the Toolbar_SetAttribute() function panel.

Good Luck,

Chris Wood
Applications Engineer
National Instruments
Message 6 of 6
(3,221 Views)