FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Resizeable screen formats
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Resizeable screen formats
Posted: Fri May 20, 2016 04:25 PM

My applications handle a large amount of data input on each screen, and they must be laid out very precisely. For this reason, I have them all in .rc defined dialogs, and they are clean.

Once I moved into windows from DOS / Clipper, I essentially abandoned @ SAY, @ GET formatting. The main reason was that I could never quite understand how to calculate the right numbers for positioning of the display lines.

The problem with the .rc dialogs is that they cannot be resized by the user. If I remember correctly, if I use the @ formatting, I can. ( Resize means I drag out the lower right corner of a dialog and the fields / text will get larger on the screen ). Maybe I do not remember this correctly at all. So much input to sort through in my brain.

So, can someone point me to precise FWH Samples that can help me understand:
1) How to properly calculate the numbers to use with the @ commands
2) How to make the dialog resize, and change the size of the controls, when expanding it out on the screen.

Thank you so much ...

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resizeable screen formats
Posted: Fri May 20, 2016 05:45 PM

Tim,

FWH provides a Class TLayout, developed by Daniel Garcia Gil, that automatically reorganizes and resizes the controls.

Please review FWH\samples\layout.prg, layout2.prg, layout4.prg examples

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resizeable screen formats
Posted: Fri May 20, 2016 05:51 PM

Please review FWH\samples\testdlg7.prg to see how to allow the mouse to resize a resources defined dialog

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Resizeable screen formats
Posted: Mon May 23, 2016 08:46 AM

search on this forum
there is a clas to resize a window ...perhaps we change it for dialog class

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Resizeable screen formats
Posted: Mon May 23, 2016 03:26 PM

Tim,

Try searching the forum for "resize."

There is an autoresize() function here that may be what you need.

viewtopic.php?f=3t=16201p=83889hilit=autoresize#p83889

Note that there are at least two versions of this function so look for the most recent one.

James

&&&

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Resizeable screen formats
Posted: Mon May 23, 2016 06:02 PM

I know that one of the products from Timm was EasyDialog. I used it in the past and know that it covers a lot of controls when dialog is resized.
You can control how and which controls move, resize, or combination.

I don't know if the version now controlled by Fivewin has been upgraded like EasyReports have.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 02:28 PM

Tim,

I'm curious to know if you solved this, and if so how?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 05:11 PM

I set it aside for now.

The first question I asked, how to calculate the numbers used in @SAY and @GET never got addressed.

There must be a way to use them precisely but it seems like when I do use them, it's pretty much a guessing game.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 08:02 PM

Tim,

FWH uses FWH\include\constant.ch to calculate those numbers

The idea when I implemented it many years ago was that doing @ nRow, ... a control could fit automatically bellow or above another
control of its same class

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 09:33 PM
Try this simple piece of code:

Code (fw): Select all Collapse
    DEFINE DIALOG oTstDlg2 TITLE "Framp" OF oWnd
        
        @ 1,0 SAY "Test"
        @ 1,8 GET tg1
        @ 2,0 SAY "Two"
        @ 2,8 GET tg2
        @ 3,0 SAY "Three"
        @ 3,8 GET tg3
        @ 4,0 SAY "Four"
        @ 4,8 GET tg4
        
    ACTIVATE DIALOG oTstDlg2 CENTERED


Because you have defined the height of SAY ( 15) and Get ( 13 ) differently, as you will see from the sample, the titles do not line up with the get fields. They go progressive lower. So the values would not be consistent and thus it would require decimals for the Say commands to get them to match the GET. Of course, a Caption option for the GET might be useful ...or Title ....

This is why I went to dialogs in the first place. However, all the samples use the @ options.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 09:38 PM

Tim,

If you use the PIXEL clause then you place them exactly where you want

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 09:45 PM
From your example:

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oDlg, tg1, tg2, tg3, tg4

   DEFINE DIALOG oDlg TITLE "Framp"
        
        @ 12, 10 SAY "Test" PIXEL  
        @ 10, 40 GET tg1 PIXEL SIZE 80, 10
        @ 22, 10 SAY "Two" PIXEL
        @ 20, 40 GET tg2 PIXEL SIZE 80, 10
        @ 32, 10 SAY "Three" PIXEL
        @ 30, 40 GET tg3 PIXEL SIZE 80, 10
        @ 42, 10 SAY "Four" PIXEL
        @ 40, 40 GET tg4 PIXEL SIZE 80, 10
        
    ACTIVATE DIALOG oDlg CENTERED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 09:51 PM

However, you are using different lines for SAY and GET

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 10:21 PM

yes because they have different heights

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Resizeable screen formats
Posted: Wed Jun 01, 2016 10:29 PM
My point is Why ?

In clipper where this originated you used @ SAY for the title, and @ GET for the field, on the same line.

Of course, the best was Clipper with: @ 10,20 SAY "Sample" GET cSample
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit