Improving my Application Interface - Replicating the Windows Update Screen Menu (W10)

The class creates a REGION over the CHECK. If instead a BUTTON,FLAT,ICON('~slider....png') that could fix some of these issues.

A button can be tabbed to, it can also have Skip. Space generates Accepted. It can have (‘Te&xt’) or a KEY() to Toggle. On Accepted the Class could change the Icon just like it does now with the Region.

[ Button works ] 1. It’s impossible to select (set focus on) the checkbox by keyboard (TAB/ShiftTAB).
[ Button works ] 2. It’s impossible to check/uncheck by spacebar.
[ Button works ] 3. It’s impossible to check/uncheck by clicking on a text.
[ Button works** ] 4. Standard functions like ENABLE(feq), DISABLE(feq), HIDE(feq), UNHIDE(feq) aren’t supported, so an existing code would be broken.
[same problem] 5. This snippet is not supported as well and an existing code would be broken.
checkVar = 1
DISPLAY(?checkVar)

#4 the Disabled button probably looks fine without changing the Icon to a special version.

AFAIK Button cannot do ReadOnly like a Check. The Class code could check that the underlying CHECK control has PROP:ReadOnly and not Toggle. Maybe display a different ReadOnly Icon.

** #4 Disable/Hide (?Button) will properly affect the Button, but if it is done to the CHECK (?CheckFeq) then that will not change the button. Maybe Register Event could catch that. Probably have to Sub Class. Using this Class will likely require some code changes, worth it if you want the look.

Dries did a CIDC presentation where he replaced a CHECK with a XAML Islands control that I think handled all the issues so existing code worked.

2 Likes

I tried the original class under AnyScreen and nothing happened so the button method might be just what the doctor ordered, I’ll give it a whirl, thanks Carl.

I prefer another approach: subclassing a control and draw on it as I wish.
The disadvantage: you should learn a low programming level (winapi and gdi).

If anyone is interested, here is a demo I wrote during the weekend, just an exe, no source code.

Going back to the original jhSlider class, I tried it out and liked the visual result very much. And I get that most users are mouse-only these days.

One thing that bothered me was fact that the created regions and images wouldn’t play well on a resizeable window when (say) I wanted the over-ridden checkbox to be “anchored” bottom left.

But maybe you don’t see this ever being used on resizeable windows?

And maybe you could address that in a template if you cared (EVENT:DoResize probably the trigger).

Just saying.

If a Control Template was used to implement the class it would have a Control on the Window to be managed by the Resize template. Then the Class would not CREATE the Region/Button, instead the control template would have it.

You could also create a method of the class to pass in an ABResize class and then have the class register the controls it creates with the resizer class.

1 Like

Yup or as the french say … Quaip…

i tried a button in his class also…

!-- Create the Region FEQ …
!–
SELF.EntryQ.dwRegionFEQ = Create(0,CREATE:button,inParentFEQ)

maybe could change queue to handle lots of dynamic controls…

jhEntryQ_Type Queue,Type
dwFEQ LONG,NAME(‘dwFEQ’) ! You can now add pipes
dwButtonFEQ LONG

theField ANY ! Use this to reference the actual variable, typically a BYTE but can be a LONG
END

jhEntryQ.dwFEQ = FIELD()
Get(jhEntryQ,‘dwFEQ’)

You are right Carl, a button is better, it allows use of Tab/ShiftTab and SpaceBar, also …
a) only 2 x pngs required to indicate value 0/1, ie: RTL handles visual when the button is disable
b) code in the class is simplified
c) use of PROP:Flat removes the otherwise persistent selector rectangle that identifies the control
d) I expect it to work under AnyScreen which the earlier version did not.

Thank you for your suggestion … a very worthwhile change.

[Edit]
I corrected an erroneous png link in jhSLider2.zip
jhSlider3.zip (461.4 KB)

Hi Simon,
You are right, it’s a lot easier to move the new BUTTON control than a REGION-IMAGE combination.
I have a resizer to handle this (but that’s another story).
Slider-with-ReSize

1 Like