|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri May 07, 2021 3:04 pm Post subject: Adding a pivot, perhaps dynamically? |
|
|
I have been toying with this for some time and am curious if someone has a solution.
Generally, I design my windows to fit a screen less than 80% of 1920x1080 using the windows scaling value of 100%. This allows some scaling, better display on 4K monitors, etc.
However, I am finding that some of my users (and myself) will have trouble with font size even on larger monitors. It is possible, using winclass@() to set the font and scaling for the window default, which should help some users. But, some of my windows may need to be scrolled to do so.
I can add horizontal and vertical scrollbars (%ch[hscrollbar,vscrollbar]). This does two things. It makes the window scrollable, which is nice, but adds additional size to the window to support the scroll bar, whether or not it is actually used which is not nice. So far, I have resisted using this technique for every window I create.
I do not know how other programs (such as Word or Excel, quicken, etc.) dynamically add/remove scrollbars to their windows. I know I am missing something here!
If what those programs do is not possible with ClearWin, is there a method by which the size of a child window can be determined before it is used by the parent in order to use the scrollbar options in the %ch window? Or, are there alternatives I should consider instead?
Always up for learning!
Bill |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri May 07, 2021 3:55 pm Post subject: |
|
|
Bill
You can change the default font by calling winclass@. If you want users to have control of this then you could provide a dialog that asks the user to select a font size, save the result in an ini file or the registry and then prompt the user to restart the app (reading back the new font size).
There are two ways to use scrollbars. Sometimes they are built into the control that you are using. A Microsoft edit control is one exampe of this. You can see the behaviour in Notepad or in %re. Typically (at least in Notepad) the scrollbar is always present but goes grey when not needed.
In ClearWin+ you can use %vx and %hx to create scrollbars as independent controls. In theory at least you can then show/hide or create/destroy at will. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri May 07, 2021 10:50 pm Post subject: |
|
|
Paul, thanks for the tips. I had been planning to use winclass@() as an option for my users, but to do so will require reworking the windows a bit, adding the scrollbars. I did it as an experiment with winclass@ font and sizing and was pleased to have the level of control, but then it became obvious I needed to incorporate scrollbars when the window became un-clickable, extending off the visible desktop!
So some more work!
Bill |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|