Welcome, Guest
Username: Password: Remember me

TOPIC:

Beginners Example 25 Sep 2021 17:43 #19719

  • wriedmann
  • wriedmann's Avatar


  • Posts: 2767
  • Hi Joe,
    unfortunately I'm away this weekend and have no development notebook with me.
    I will look at this on Sunday evening or Monday when I'm back.
    What I can say: WPF is entirely vector graphics based and therefore WPF applications can be scaled without loss of quality (excluding some bitmap grahics when they are included).
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Beginners Example 25 Sep 2021 18:17 #19721

    • OhioJoe
    • OhioJoe's Avatar


  • Posts: 102
  • Thank you, Terry and Wolfgang.
    I need to solve this "tiny text" problem but fortunately the VO app is largely the same as X#. Less than an hour to convert it and make all the necessary changes in XIDE. So I will go through the VO applications and make everything larger. Change the 8-point text to at least 10 or even 12 where possible. Enlarge all the windows. Use a minimum window size of 1080 x 720 instead of 800 x 600, which is the current default.
    This will take probably a week. (Might only be a couple of days.) At least then I've met, at least temporarily, the requests (dare I say complaints) of users with high-resolution monitors.
    Then I'll tackle WPF, which obviously is where this should go. Call me crazy but I think the code from the constructor methods of the GUIs can be converted to XAML. (At least that was my thinking when I started reading about WPF/XAML.)
    Terry: moving from DBF to SQL (ADO) isn't so hard. Think about it:
    Every "while !oServer:Eof"
    becomes
    "while rdr:read()"
    Resolving the loop logic is 80 percent of it, at least in my experience.
    Thanks for the help and advice. When this is done, I'm hoping to publish a some sort of how-to for all those DBF people out there who know they need to switch but just can't seem to pull the trigger.
    Joe Curran
    Ohio USA

    Please Log in or Create an account to join the conversation.

    Beginners Example 26 Sep 2021 19:10 #19725

    • wriedmann
    • wriedmann's Avatar


  • Posts: 2767
  • Hi Joe,
    I have now looked at my sample.
    It has font sizes hard coded in the source code, but with WPFs databinding it is really easy to make that configurable with an input control in the GUI (and of course these sizes can be read from any configuration file).
    You can look at the source code in BrowseForm.prg file and see the hard coded sizes:
    oMargin := Thickness{ 5 }
    nHeight := 30
    self:Height := 400
    self:Width := 700
    
    oGrid:RowDefinitions:Add( RowDefinition{}{ Height := GridLength{ 40 } } )
    
    _oDataGrid:FontSize := 20
    
    oButton:Width := 100
    Wolfgang
    P.S. a transformation from DBF to SQL may seem easy, but only as long as you have small database sizes and it is no problem to keep the entire table in memory. With a DBF, you have only the current record in memory, whereas SQL keeps the entire select result in memory.
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Beginners Example 27 Sep 2021 05:46 #19726

    • wriedmann
    • wriedmann's Avatar


  • Posts: 2767
  • Hi Joe,
    I have now added a bit of databinding to my sample:

    Please try to play a bit with it changing the values of the size textbox.
    And here is the XIDE export file:

    File Attachment:

    File Name: WPFDBFEnhanced.zip
    File Size:4 KB

    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it
    Attachments:

    Please Log in or Create an account to join the conversation.

    Beginners Example 27 Sep 2021 16:20 #19727

    • OhioJoe
    • OhioJoe's Avatar


  • Posts: 102
  • Thank you, Wolfgang. If I see a way forward here, it would be to calculate variables such as font and grid sizes on the basis of screen resolution. Similar to what is done in CSS. That doesn't readily help with actual screen coordinates in complex data windows but I can see a say of calculating coordinates in simpler windows.

    Not exactly "vector based" but it does go a long way toward solving the high-screen-resolution problem.
    Joe Curran
    Ohio USA

    Please Log in or Create an account to join the conversation.

    Beginners Example 27 Sep 2021 16:32 #19728

    • robert
    • robert's Avatar


  • Posts: 2350
  • Joe,

    Forgive my ignorance, but why don't you "simply" tell your customers to change the scaling on the display settings ?
    Or change the font size in the "Accessibility settings" ?
    Is that not enough ?

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Beginners Example 27 Sep 2021 16:45 #19729

    • wriedmann
    • wriedmann's Avatar


  • Posts: 2767
  • Hi Joe,
    how shoud the program understand if your customer is using 1920x1080 on a 17" screen (and needing small characters) or using 1920x1080 on a 10" screen (and needing large characters)?
    All what you can do (and what Robert also wrote) to be confident that your customers are setting the right font size for their monitor size (normal = 100%, large = 150%, or even 200%).
    If you are using VO application and your users are using larger fonts than normal, your windows may be distorted if you are using "pixel positions" on "yes".
    CSS works a bit differently because the browsers often transmit the device type, but even this does not works always.
    Windows does not transmits the screen size, only the resolution.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Beginners Example 27 Sep 2021 21:41 #19730

    • OhioJoe
    • OhioJoe's Avatar


  • Posts: 102
  • Robert: No one's ignorant here. (Except perhaps me.)

    Wolfgang: As long as you can get the screen resolution, then you can get along without the exact size. Just assume 16:9 or 4:3. Then at least you can determine the likely most readable dimensions for grids. Windows are harder, obviously, because they involve screen coordinates. (I'm already doing something like this in one of my apps.)

    Here's the problem: many of my users have laptops with vertical resolutions of 1440 pixels or more. (2500 or more horizontally). Which makes pixel-based windows too small and therefore difficult to read. In my case I've found that the problem is mitigated by changing to 12-point the default fonts of SLEs and textboxes. This will at least keep me in business with these users until I can complete a "vector-based" solution.

    With all due respect, changing Windows settings is out of the question.

    Take my word for it, based on three decades of end-user support: Change their settings and then all of a sudden you will own their desktops and any subsequent problems ("Everything worked until you made me make that change.") Plus there's the problem of users in large organizations where Windows changes are blocked by group policy.

    So it's either a vector-based solution or something in between.

    I'm beginning to think that to reach the widest possible customer base the proper solution would be to develop both windows- and browser-based GUI solutions for the same app.
    Joe Curran
    Ohio USA

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 01:29 #19731

    • Chris
    • Chris's Avatar


  • Posts: 2713
  • Hi Joe,

    Since the users do not want to change the window settings for font size, then if they are not comfortable with the size of the menus in your app, don't they have same problem in (almost) all other apps as well? What do they do about them?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 02:49 #19732

    • OhioJoe
    • OhioJoe's Avatar


  • Posts: 102
  • Chris,
    The major accounting applications and MS Office seem to have solved this problem. So that would account for a majority of software that users have installed on their PCs and Macs.
    Other than that, I'd have to say that most are logging into web apps. Most of my competitors are on the web.
    I'm now seeing users discard their PCs altogether and doing everything from an iPad. They log into remote desktop to use our app.
    Joe Curran
    Ohio USA

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 05:04 #19733

    • wriedmann
    • wriedmann's Avatar


  • Posts: 2767
  • Hi Joe,
    I cannot immagine that notebook users with 2800x1440 pixel screens are not using large fonts..... When installing Windows on a new 15" 1920x1080 notebook, large fonts are set by default.
    Maybe the problem is you VO application that is using the "pixel positions" setting on "yes" in all Windows?
    I have started several years ago to change that, and my VO applications are working very well even on large fonts.
    But it is another trend of the last years to have very large fonts on web pages and applications to hide missing content. I cannot do that with my applications because I have many informations to show.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 08:58 #19735

    • Chris
    • Chris's Avatar


  • Posts: 2713
  • OhioJoe wrote: The major accounting applications and MS Office seem to have solved this problem. So that would account for a majority of software that users have installed on their PCs and Macs.


    In what way have they solved this problem? Do you mean they are using larger menu fonts indeed than your app?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 14:18 #19736

    • OhioJoe
    • OhioJoe's Avatar


  • Posts: 102
  • Chris: I assume they've instituted scalable controls.
    Wolfgang: The pixel position setting has always been set to Auto

    Since I'm the only one presenting this problem, I think we should drop this subject unless/until we hear from others. Don't want to waste anyone's time.

    Wolfgang, I do thank you for the sample. I will implement your example and show what I've done to scale the size of the grid.
    Joe Curran
    Ohio USA

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 14:51 #19737

    • wriedmann
    • wriedmann's Avatar


  • Posts: 2767
  • Hi Joe,
    in one of my VO applications that has many ListViews I have implemented the possibility to resize the character size of the ListView control using the mouse wheel (and that works also on a touch screen).
    And I have a Window class that changes the control sizes and font sizes when zooming it in or out (I'm using this for a cashier screen).
    All that is done with the "normal" VO GUI classes in VO applications.
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 15:36 #19738

    • Chris
    • Chris's Avatar


  • Posts: 2713
  • Hi Joe,

    You are not wasting anyone's time, this is an interesting discussion! I am just puzzled about why do your users not want to set the system font size to an acceptable level. I recently bought a very large monitor and if I use the 100% system font setting, then the text in all my (not VO or X# ones) apps are so tiny that it is completely unreadable. So I just change the setting to a good enough value (175%), and all my apps look fine! Leaving it to 100% would had been completely unworkable for me, in all apps that I am using...
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Beginners Example 28 Sep 2021 17:08 #19739

    • Terry


  • Posts: 260
  • Joe

    I hope that I am not wasting your time here, the important thing is that the points raised have "nudged" you into a way of "seeing" a solution for yourself.

    But you did pose the question "how did they do it in MS Office Applications"?

    Exactly how I do not know. There is no single RIGHT way.

    But consider this:

    Behind the scenes the result is a projection of something meaningful (to humans) on to a 2-Dimensional screen. Whether by written word (various Fonts), diagram, or by screen rendered photograph (JPEG) or indeed any mix of these.

    So what is the source of this "something meaningful"? In addition to the obvious (our own desciptions of objects) it can include ideas in our own minds. (Think now of a Picasso Painting or The Scream).

    It makes no difference as to how this translation to screen is achieved. Thus WPF and Vector Graphics, WinForms, Browser Input, all end up the same way.

    Vector representation and so on, simply makes things easier for us to understand.

    When it comes to the fundamentals of what is being done it comes down to mathematics. Essentially Matrix manipulation. If you look directly at you screen center you can easily imagine left/right or up/down movement and scaling.

    There is too, a third dimension. Essentially with a small screen this is effectively zero. But move off-centre or for a very large sceen it becomes significant. Again it is down to 3-D matrix manipulation.

    None of this is difficult in itself, but it does take significant time to learn and "sink in", when that time could be better used elsewhere.

    MS has the resources, time and skills to address such aspects in fine detail. But both in WinForms and System.Windows they have bypassed the need for application developers to think to such levels of detail.

    Hope that makes some sense.

    Terry

    Please Log in or Create an account to join the conversation.