Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Create (un)Dockable Toolbars in Dialog
#1
Project:
Create a dockable toolbar for a dialog that can be moved outside the parent window when undocked.

Information:
A parent dialog containing a toolbar section.
Toolbar section has a right click menu that allowing user to turn seperate toolbars on/off
Toolbars are dockable when brought to the toolbar area.
Toolbars are sizable and can be moved anywhere on the screen when undocked

Pretty much the same idea that can be seen in most programs...i.e. toobars in Microsoft Word. Now how to create this same thing with QM is the question.

Thanks,
Jimmy Vig
#2
August 12 2008:
Added moving/resizing of a control below the toolbar. If you need to move/resize more controls, do it in DFT_ResizeControls.


Attached Files
.qml   Dialog floating toolbar.qml (Size: 3.96 KB / Downloads: 390)
#3
Sweet, thats cool.
#4
Geeze that was fast and totally cool. Did you already have that ready to go, or did you just do that today!

Awesome work!
#5
This is mind blowing fantastic - Can you make it drag to undock or drag to doc?
#6
Man...I am like a thousand steps behind understanding all of this. But it is so neat. Thanks again!
#7
Could I get a definition for TB_ADDSTRINGA, who made it, why is not on msdn. I would like to know how I could use this on y programs.
#8
same as TB_ADDSTRING.
When you see SOMETHINGA or SOMETHINGW, look for SOMETHING documentation.
#9
I decided to make more floating toolbars witch was not too hard but I had to create new functions for all new toolbars.

Is there a way to make new toolbars without creating all new functions for them?
#10
Yes, but depends on how your toolbars and other controls will be positioned, etc. I cannot give a general example.
#11
Gintaras - Could I please get some help with this!

I simplified it to just cloning the functions that you had. I want Toolbar 2 to dock under Toolbar 1


.qml   MY_DFT_MAIN.qml (Size: 6.98 KB / Downloads: 358)

but I just can not seem to make it happen. I always get Toolbar 2 to dock over Toolbar 1.
   

I do not know why you have to do it this way but I undock Toolbar 1 then resize the window to get Toolbar 2 to appear.


Attached Files Image(s)
   
#12
By default toolbars automatically move itself to the top. To disable this you should set or remove some styles (don't remember, read in MSDN, the styles probably are documented somewhere in common control styles). Then, instead of sending TB_AUTOSIZE message, use MoveWindow for each toolbar to move it to correct position. Another solution - use rebar control. It is more difficult but then user can reorder toolbars.
#13
It is a place to start.

Thank You


Forum Jump:


Users browsing this thread: 12 Guest(s)