-
Re: CommonControls (Replacement of the MS common controls)
This is the 1.3 ActiveX Control version. (End of support)
Removed
-
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.
help please
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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)
Update released.
Could be important when using the ListView control as the Shift parameter in the ItemActivate event was not properly set. (LVN_ITEMACTIVATE handler)
-
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?
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
Attachment 135225
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
IdealWidth was what I was missing. Perfect.
-
Re: CommonControls (Replacement of the MS common controls)
Krool, do you plan to do something on the transparency effect of the toolbar buttons?
I mean the black background issue.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Karl77
Krool, do you plan to do something on the transparency effect of the toolbar buttons?
I mean the black background issue.
I don't know how to achive for non-icon picture and w/o mask color...
You use png files in the ImageList?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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?
Yeah, that might require GDI+. possibly a can of worms for you to add it to your project, unless you want to do it Via the flatapi.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
BTW, the PNGs came into the imagelist via GDI+.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
DEXWERX
Yeah, that might require GDI+. possibly a can of worms for you to add it to your project, unless you want to do it Via the flatapi.
Flatapi?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Karl77
Flatapi?
I was wondering if someone would raise that
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
https://www.freebasic-portal.de/tuto...icons-111.html
-
Re: CommonControls (Replacement of the MS common controls)
Slightly unrelated, but something possibly omitted (but is in the link you posted) Are you going to add TBSTYLE_TRANSPARENT to the toolbar?
regards,
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
https://www.freebasic-portal.de/tuto...icons-111.html
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)
Quote:
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.
What can I do to help to track down the issue?
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Krool,
VERY GOOD NEWS.
The transparency on the toolbar buttons works.
I must have done several things wrong before, but I don't really know what...
I re-downloaded your project.
Trew out some controls I don't intend to use, and the main form as well.
So I had the Pager form left.
Placed a new Krool-imagelist.
Recreated the icons as BMP32.
Filled the imagelist in the IDE.
BANG! Works.
See:
Attachment 135445
I apologize for the whole trouble I made.
Karl
-
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)
Quote:
Originally Posted by
DEXWERX
Now the question remains, can we get the Toolbar itself transparent (Design time Property of the toolbar / TBSTYLE_TRANSPARENT )
I have noted this point in my ToDo list.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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. :)
Thanks for keeping VB alive. Regards.
-
Re: CommonControls (Replacement of the MS common controls)
I have now implemented TBSTYLE_TRANSPARENT. This was useful to have the BackColor property shown/visible at design-time.
I will also include soon a "Transparent" property. This makes a background as a replica of the underlying background. (simulated transparency)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
DEXWERX
donations for this project should also be on your todo. :)
I second that.
Small other remark: PNG works now as well.
I'll prepare an example next week.
Great work Krool!
-
1 Attachment(s)
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.
-
Re: CommonControls (Replacement of the MS common controls)
RichTextBox Help
I know that this auto detects URLS but so far I cant find a way to actual open the url with default app ie Browser / Email etc.
I have tried a couple of suggestions from around but there based on original and dont seem to work.
I presume since it auto detects i must be relatively simple to run it!
** 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
-
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.
Karl
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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)
Quote:
Originally Posted by
Krool
Does it also happen with the OCX version?
On UserControl Version did you include the VisualStyles.bas and init it on Sub_Main?
I dont use the OCX version
Yes included VisualStyles and have done the Init from submain
-
Re: CommonControls (Replacement of the MS common controls)
I ment to say I have called this manually from my form_load on MDI form 'Call InitVisualStyles'
my MDI form is call frmMain and if use the Startup.bas code I get Ambiguous name detect : Main
*** just remeber I have a main in a different module so have added it there **
Still same issue
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
jpskiller
I ment to say I have called this manually from my form_load on MDI form 'Call InitVisualStyles'
my MDI form is call frmMain and if use the Startup.bas code I get Ambiguous name detect : Main
*** just remeber I have a main in a different module so have added it there **
Still same issue
Can you try to use the OCX version? Just for debug.
And can you share a demo which shows the crash?
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Heres a very basic program
MDi startup, opens form with richtextbox, when close form crash out
If change sub form to not MDI child then can close with no issues
Sorry not done OCX demo as I cant use it I have to have no dependencies and dont' know how to set it up with OCX
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
jpskiller
Heres a very basic program
MDi startup, opens form with richtextbox, when close form crash out
If change sub form to not MDI child then can close with no issues
Sorry not done OCX demo as I cant use it I have to have no dependencies and dont' know how to set it up with OCX
I have no crash. What OS do you use?
In your demo now the VisualStyles.bas was not included.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
Done. Thanks
-
Re: CommonControls (Replacement of the MS common controls)
I use windows 10, and the VisualStyles.bas is showing up under Modules on the demo, I did add it!
-
Re: CommonControls (Replacement of the MS common controls)
(Busy slider)
Quote:
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)
Quote:
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...
Update released.
Now it should work as expected.