xsharp.eu • Beginners Example - Page 4
Page 4 of 6

Beginners Example

Posted: Tue Jul 13, 2021 1:50 pm
by OhioJoe
I'm trying to move into WPF so unless others think it's an important upgrade, I would not ask Chris to elevate it on his to-do list. For me enlarging the font is merely a temporary stopgap to relieve some of the tiny-text problems while I figure out the new GUI.

Beginners Example

Posted: Tue Jul 13, 2021 2:26 pm
by Chris
Are you guys talking about the font size in the editor in the IDEs themselves? That's very easy, there's an option in the preference window in both VO and XIDE. Also CTRL + Mouse Wheel works on the fly while in the editor in both IDEs. But I guess I have probably misunderstood you!

Beginners Example

Posted: Tue Jul 13, 2021 2:50 pm
by wriedmann
Hi Chris,
it is about the default font that the Window Editor uses for the different controls, and AFAIK there is no setting for this.
For the source code editor and the explorers is settable (and in fact I have set my editors font to the Hack font).
Wolfgang

Beginners Example

Posted: Tue Jul 13, 2021 3:22 pm
by Chris
Hi Wolfgang and Joe,

Ah, thanks, I understand now. Actually there is a way in XIDE to do this (or sort of). If you unzip and copy this file to the project Config folder:
DefaultProperties.zip
(720 Bytes) Downloaded 122 times
then every time you add a new TextBox control to a winform, it will automatically set the Font property to Courier New, with a font size of 20. This is done through those lines in the file:

Code: Select all

CONTROL = TextBox
  Font = Courier New, 20
END
In the same way, it is possible to set the default font for every control that you need to, for example you can add those lines to set the default font also for CheckBoxes:

Code: Select all

CONTROL = CheckBox
  Font = Courier New, 20
END
But this will affect only new controls you put to forms, old controls will not change at all, you will need to set their property manually in the form editor. So I am not sure if this suitable for what you want to achieve, but it's worth a try..


Edit: Oh, I should also mention that this is working for the WinForms editor only, but if it's needed for the VOWED, I can enable it there, too..

Beginners Example

Posted: Tue Jul 13, 2021 3:26 pm
by wriedmann
Hi Chris,
thank you very much!
Is there any way to add that also to the VO compatible WIndow Editor?
Wolfgang

Beginners Example

Posted: Tue Jul 13, 2021 4:25 pm
by Chris
Hi Wolfgang,

Oh, I totally forgot, but I have already implemented this also for the VOWED, and even from the VOMED and VO Dbserver editor etc! You need to add a section [VOWINDOW] for the WED:

Code: Select all

[VOWINDOW]
CONTROL = SingleLineEdit
  Caption = Test caption
  Tooltip = My tooltip
END
This will make all new SLEs have the mentioned caption and tooltip. But I see that for some reason this does not work for the font property, will look into it...

Edit: Font also works, it's just that the syntax is different (follows the way it is stored in the VO binaries):

Code: Select all

[VOWINDOW]
CONTROL = SingleLineEdit
  Font=12:Courier New
END

Beginners Example

Posted: Tue Jul 13, 2021 6:10 pm
by wriedmann
Hi Chris,
this is great, thank you very much!
Wolfgang

Beginners Example

Posted: Fri Sep 24, 2021 6:49 pm
by OhioJoe
Wolfgang, I tested this code on a high-resolution monitor, hoping it would resolve the "tiny type" problem. In other words: render everything as a percentage of screen size.
Is this the starting point? Is there a setting I'm missing? Should I attach an XAML ? Is there something I should read first ?
My two main goals are
1) move from DBF to SQL. That project is moving along.
2) Get into WPF so the apps will render properly on screens of all resolutions. Just getting started.
Can you point me in the right direction? Thank you

Beginners Example

Posted: Fri Sep 24, 2021 6:52 pm
by OhioJoe
Wolfgang, BTW I was referring to the WPFDBF example that was posted.

Beginners Example

Posted: Sat Sep 25, 2021 8:05 am
by TerryB1
Hi Joe

I have not looked at this thread for some time, but you asked for advice on future course of action with two objectives: WPF and DBF/SQL.

They are different avenues, both valuable so it is not really a choice. You will gain valuable insights across the board with either. Tackle them both independently.

So let's look at what you are doing: With the DBF/SQL route you are basically looking at a different syntax meaningful to SQL rather than DBF, and as SQL is standard across the board and likely to be with us for a few years hence, from a "get marketable" point of view it is both a valuable and viable route.

WPF is different: as you say it does enable proper rendering on screens of all resolutions. But IMO that is a technology aside. Following that route will give you other insights - valuable across the board.

With WPF you are basically "looking in to the future" like taking a sneak look at the final chapters of a thriller to find out who dun'it. Effectively this equates to late binding. Thus we take a look at screen size (or render size available on screen) then scale what we want to render accordingly - or perhaps give ourselves more rendering space such as using a scroll viewer.

All this is done in the blink of an eye and takes place between key-presses with plenty of time left over. You will surely re-enforce your own knowledge applicable across the board in all areas of software development.

I hope this makes some sense and helps a bit.

Terry