For the DesktopUpDownArrows, “^” is assumed to indicate increase, and “v” to indicate decrease. There are times when the opposite could be the case.
For instance, dealing with dates. When navigating a displayed calendar, the top button would be used to move backward a week in time. The date picker, on the other hand, uses the up button to move forward in time. To resolve this, I can’t use the DatePicker, but can create a control that moves back in time for both the calendar and numbers displays using the same UpDown control.
In this case, displaying a minus sign for the top button and plus sign for the bottom would remove the ambiguity. The same could be said for navigation in some ordered lists.
DesktopUpDownArrows is a great feature, but its purpose is unnecessarily confined by the fixed symbols. The request is to add the ability to set the display characters or icons of the up and down buttons.
Did you check to see if that’s possible with the actual underlying control? Many of Xojo’s controls are system controls.
I would start by finding out if it’s possible with system APIs to change the symbols and if not roll your own control. End users care less and less about native controls these days, I lean toward controlling and ensuring functionality over looks.
If the symbols on the control are important to you, I consider that something you wish to control, and I think a custom control a fair solution for that.
I had not thought about the control being pulled from the System. That would make this a different kind of request and probably means rolling my own.
… which may not be as tedious as I thought after remembering that the DesktopCanvas allows clicks to go through it to an underlying control. Since this is a cosmetic concern, a canvas can be placed over the control. The canvas can manage the visual interface and the UpDown button can worry about the rest.
I wouldn’t intentionally plan on overlapping controls when a Canvas is involved. It’s the start of a slippery slope. Do as you wish, but my opinion is that a stepper control is such a simple control it’s like 30 minutes of work tops-- if an AI couldn’t just write the whole thing.
On macOS the control is an NSStepper and the API to access the icons is not public.
No clue about Windows.
1 Like
Could you not leave the interface the way it is and simply alter the date the way you want to in the UpPressed / DownPressed events?
I would think people would understand, better than - / + symbols. What do system apps do, I would think there may be an example in System Preferences. If you can find one I would stick to that behaviour.
It looks like Apple has addressed the issue by not placing increment (UpDown) controls next to sliders or pop-up lists. Where pop-up lists do appear, they may be in ascending or descending order for different items. Where increments are available, the values are typed in, like font size in TextEdit. Pages uses an entry field next to the UpDown arrows, where Up increases the font size, but no pop-up list or slider is used.
I’m trying to provide way to change a value, using an ordered list and an increment control, or a slider and an increment control. So does the Up arrow in the UpDown control mean up the list or upping the value, or up the calendar or upping the date? This is where I thought the symbols - (produce a smaller value) and + (produce a larger value) give a more predictable indication of what was about to happen.
Apple’s approach may be the answer. On the other hand they may have boxed themselves into that by using the better looking icons…