Re: CommonControls (Replacement of the MS common controls)
Update released. (Discard the update yesterday)
There was an issue with the CoolBar. It can be reproduced with the Demo project.
Compile .exe at 96 DPI setting. Change system to 120 DPI and you will notice the CoolBar is not sized correctly.
Everything will "increase" in size (because of higher DPI) but due to the Childs there can be a scenario which can cause a problem.
The CoolBar will try to queeze the child control into the given borders, but some controls (like the ImageCombo) which have an internal resizing can "reject" the squeeze. The CoolBar will back down and gives the ImageCombo the necessary space and thus the CoolBar resizes but will not notify the parent via RBN_HEIGHTCHANGE. And that's actually the issue. My UserControl is then unaware of this play and does not resize accordingly. (as no RBN_HEIGHTCHANGE notification in this scenario)
As long as IDE and .exe are both in same DPI setting this issue does not pop up. But in case the DPI setting is on one of the side different there is a difference in size and causing the issue.
This was solved by simply calling UserControl_Resize whenever a Child control is set to the CoolBar control.
Re: CommonControls (Replacement of the MS common controls)
I have a small issue, excuse me if it seems stupid
I have this bit of code :
Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.TreeView1.SelectedItem = Me.TreeView1.HitTest(X, Y)
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As TvwNode, ByVal Button As Integer)
On Error GoTo MyErrorHandler
AgentSelected = TreeView1.SelectedItem.Text
etc
end sub
the issue is that when I click in the Treeview1 it executes the NODE_CLICK before Treeview1_MouseDown
I need to execute the mouse down event first or somehow reproduce the same code in treeview1_mousedown at the moment I have to click twice on a item before it updates correctly.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by jpskiller
I have a small issue, excuse me if it seems stupid
I have this bit of code :
Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.TreeView1.SelectedItem = Me.TreeView1.HitTest(X, Y)
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As TvwNode, ByVal Button As Integer)
On Error GoTo MyErrorHandler
AgentSelected = TreeView1.SelectedItem.Text
etc
end sub
the issue is that when I click in the Treeview1 it executes the NODE_CLICK before Treeview1_MouseDown
I need to execute the mouse down event first or somehow reproduce the same code in treeview1_mousedown at the moment I have to click twice on a item before it updates correctly.
help please
Oh.
This is a side effect caused by my update from 21-Nov-2015.
The update was reasonable.
Will look soon for a fix to bring the events in right order.
This bug now affects only ListView and TreeView.
The problem is due to internal DragDetect and thus WM_LBUTTONDOWN hangs.
Re: CommonControls (Replacement of the MS common controls)
Important update released.
Mouse events now again in correct order in the ImageCombo, TreeView and ListView control.
And there are raised 'After'. How it should be.
Problem was an internal modal message loop on these controls. (DragDetect)
This is also documented by MSDN.
Solution:
Custom message now implemented "UM_BUTTONDOWN".
This is posted (PostMessage API) to the control right before passing WM_LBUTTONDOWN/WM_RBUTTONDOWN to the control.
Re: CommonControls (Replacement of the MS common controls)
Just wanted to point out a pretty significant omission given the level of feature-completeness of this project: overlays for treeview and listview. LVIS_OVERLAYMASK/TVIS_OVERLAYMASK, and the ability to add them in the ImageList control. Would be cool to have, but no biggie.
Re: CommonControls (Replacement of the MS common controls)
This came up in another thread, but is there an example on how to use the Use Chevron Dropdown and ChevronPressed event of your Coolbar Control replacement?
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by DEXWERX
This came up in another thread, but is there an example on how to use the Use Chevron Dropdown and ChevronPressed event of your Coolbar Control replacement?
You have to enable "UseChevron" and define the "IdealWidth" value in a band.
The chevron button is shown if the band is smaller than "IdealWidth". When clicking on the button the event "ChevronPushed" is fired.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
You have to enable "UseChevron" and define the "IdealWidth" value in a band.
The chevron button is shown if the band is smaller than "IdealWidth". When clicking on the button the event "ChevronPushed" is fired.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
I don't know how to achive for non-icon picture and w/o mask color...
You use png files in the ImageList?
Yes, PNG with alpha.
Tried ICO+alpha instead today.
Last idea for tomorrow is BMP32.
I'll report then.
It would be very good to get it working with your toolbar.
Because it is the only one I know of which doesn't draw a border around himself.
And has the ability to set a determined bg color.
Re: CommonControls (Replacement of the MS common controls)
Last idea for tomorrow is BMP32.
I'll report then.
No luck with BMP32.
The CC5 toolbar accepts the transparency.
The Krool toolbar should do it the same way, as it is the same control.
But another wrapper.
And my assumption is that all is ok with the Krool toolbar.
But the transparency information gets lost when the image data is handed over.
I *think* that this could be the only problem.
Just an idea.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Karl77
No luck with BMP32.
The CC5 toolbar accepts the transparency.
The Krool toolbar should do it the same way, as it is the same control.
But another wrapper.
And my assumption is that all is ok with the Krool toolbar.
But the transparency information gets lost when the image data is handed over.
I *think* that this could be the only problem.
Just an idea.
My assumption is that it lies on my ImageList control and the transparency gets lost by the PropertyBag. Did you try with an pure API ImageList and set manually to the ToolBar?
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
My assumption is that it lies on my ImageList control and the transparency gets lost by the PropertyBag. Did you try with an pure API ImageList and set manually to the ToolBar?
No, I didn't use your imagelist.
I used the one CC5 provides.
As this one works with the CC5 toolbar, I think we can exclude this as a cause.
Re: CommonControls (Replacement of the MS common controls)
That looks great. (not being sarcastic because of the ugly green, but it's great that transparency works)
Now the question remains, can we get the Toolbar itself transparent (Design time Property of the toolbar / TBSTYLE_TRANSPARENT )
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
I have noted this point in my ToDo list.
You've single handedly surpassed the original CC Replacement project... It may be a can of worms, but donations for this project should also be on your todo.
Re: CommonControls (Replacement of the MS common controls)
So here is the example for the toolbar using PNGs.
There is still a lot to do, but up to now it works quite well.
The graphics itself are for testing only, I know they have to be fine-tuned for the different sizes.
Last edited by Karl77; Feb 22nd, 2016 at 03:33 PM.
Re: CommonControls (Replacement of the MS common controls)
Busy Slider
Krool, I have found a small issue in the slider.
It fires the scroll event 2 times when clicked.
The 'original' control doesn't show this beahvior.
To retrace:
Place a Slider1 on a form (range 1 to 4).
Place a label "lbl_1" (caption "0").
In Slider1_Scroll, lbl_1.Caption = CStr(CInt(lbl_1.Caption) + 1)
Scroll by mousewheel and see how the label increases by 1 on every scroll action.
But click the slider and see how the label increases by 2.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by jpskiller
RichTextBox Help
** I have also noticed if I use the RichTextbox on a MDI form and set as child, when close the form it crashes the app, when normal form it is OK
Help appreiated
Does it also happen with the OCX version?
On UserControl Version did you include the VisualStyles.bas and init it on Sub_Main?
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Karl77
Busy Slider
Krool, I have found a small issue in the slider.
It fires the scroll event 2 times when clicked.
The 'original' control doesn't show this beahvior.
To retrace:
Place a Slider1 on a form (range 1 to 4).
Place a label "lbl_1" (caption "0").
In Slider1_Scroll, lbl_1.Caption = CStr(CInt(lbl_1.Caption) + 1)
Scroll by mousewheel and see how the label increases by 1 on every scroll action.
But click the slider and see how the label increases by 2.
Re: CommonControls (Replacement of the MS common controls)
(Busy slider)
Originally Posted by Krool
Done. Thanks
Slight issue left:
If you click the control the only one scroll event is produced now - good.
But when you scroll by mousewheel, there is NO scroll event now...
(I only exchanged the Builds\Slider folder, as I found no other differences to the former release. Anything more to do?)
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Karl77
Slight issue left:
If you click the control the only one scroll event is produced now - good.
But when you scroll by mousewheel, there is NO scroll event now...