I’ve just released a custom control on my Website - Panda Tech Services
It’s a filter control very similar to that found at the top of the Xojo Navigator. Feel free to download it and have a play, you are free to use this control as you wish with no restrictions.
If you can let me know of any additions you’d like or bugs you may find!
[quote=102594:@Patrick Delaney]I’ve just released a custom control on my Website - Panda Tech Services
It’s a filter control very similar to that found at the top of the Xojo Navigator. Feel free to download it and have a play, you are free to use this control as you wish with no restrictions.
If you can let me know of any additions you’d like or bugs you may find![/quote]
Bravo good sir. I’ll be swapping the icons for native-looking Mac icons but this could be useful in a forthcoming project. Thanks!
Pat, here’s some native Mac search field cancel icons and I’ve added two extra for MouseDown, for native Mac feel. I’m having more trouble with the magnifying glass icon but if I nail it, I’ll send it on over.
I’m just tidying up version 1.1 which uses Gavins cancel button icons, much nicer and we have both mousedown and mouseup images for the cancel button, much like the OSX finder…
Trying to track down a better magnifying glass icon…
Some of the changes coming in 1.1. One bug left to sort out then it’s getting released.
1 - Using Gavins Cancel icons
2 - Now using separate MouseDown/MouseUp images on the cancel button
3 - Changed the magnifying glass icon to a better one
4 - The Cancel Filter button is actioned on the mouseup event rather than the mousedown
5 - The magnifying glass icon changes to a lighter version when the window is deactivated or disabled, more in line with the OS
6 - Improved the accuracy of a cancel button click - was off by 5 pixels!
7 - You can now use the FocusRing property - no longer just uses a FocusRing whether you want to or not!
8 - Use FocusRing is now a property which can be set in the Inspector
9 - New property ‘FontColourDisabled’ which can be set in the Inspector. When the control is disabled this colour is used so that the text looks right against a disabled control
Version 1.1 has just been released and uploaded to my website.
See my previous post for what’s changed, hopefully this should look/feel a little more polished.
KNOWN ISSUE (OSX) - if you deactivate a window with the control having focus, the focusring doesn’t get removed properly. I believe this is a known issue with Xojo
There is one weird issue I found.
I had entered a character in the find control and then I accidentally entered a §.
When I tried to remove that character by pressing the backspace, nothing happened.
When other characters are used, removing these characters with the backspace is no problem.
Just released v1.2 to the website which should fix this issue. Thanks for pointing it out Paul! Long story short I was using LenB rather than Len when I was removing a deleted character!!!
I found that the £ character also had the problem. If someone could give feedback on the fix I’d appreciate it.
Looks good. One addition that would be nice: the firs thing I did was type in a few characters and then hit the Esc key to cancel out of it. Which doesn’t work.
May I suggest adding this
Elseif Asc(Key) = 27 Then
FilterText = ""
to your KeyDown event so the escape key will work as users would expect?
Thanks Walter - I modelled the control on the Xojo Filter control and escape doesn’t do anything there.
However, I take your point though - I’ll add it to the next release, but I’ll hold fire until I find out whats’s going on with FocusRing problem. Paul’s was a bug, this is a feature request and I don’t want to do a release every 10 minutes
I am now - well, that’s embarrassing! I’ll make that change, far more elegant.
[quote=103294:@Paul Sondervan]There one thing that would be nice if you can make it work.
After I deleted the ‘wrong’ character, the list with items isn’t refreshed.[/quote]
Hmm. works for me with the £ symbol, what character you using?
I type in test and various items containing the word test are shown.
Then I enter the § ( ) and all items are gone from the list as expected.
When I delete the § the list stays empty.
I would expect the items containing the word test to be shown.