forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding a pivot, perhaps dynamically?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1003
Location: Morrison, CO, USA

PostPosted: Fri May 07, 2021 3:04 pm    Post subject: Adding a pivot, perhaps dynamically? Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7068
Location: Salford, UK

PostPosted: Fri May 07, 2021 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1003
Location: Morrison, CO, USA

PostPosted: Fri May 07, 2021 10:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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