Resizeable screen formats

Resizeable screen formats

Postby TimStone » Fri May 20, 2016 4: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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Resizeable screen formats

Postby Antonio Linares » Fri May 20, 2016 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resizeable screen formats

Postby Antonio Linares » Fri May 20, 2016 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resizeable screen formats

Postby Silvio.Falconi » Mon May 23, 2016 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Resizeable screen formats

Postby James Bott » Mon May 23, 2016 3:26 pm

Tim,

Try searching the forum for "resize."

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

viewtopic.php?f=3&t=16201&p=83889&hilit=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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Resizeable screen formats

Postby Gale FORd » Mon May 23, 2016 6: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.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Resizeable screen formats

Postby James Bott » Wed Jun 01, 2016 2: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Resizeable screen formats

Postby TimStone » Wed Jun 01, 2016 5: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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Resizeable screen formats

Postby Antonio Linares » Wed Jun 01, 2016 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resizeable screen formats

Postby TimStone » Wed Jun 01, 2016 9:33 pm

Try this simple piece of code:

Code: Select all  Expand view  RUN

    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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Resizeable screen formats

Postby Antonio Linares » Wed Jun 01, 2016 9:38 pm

Tim,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resizeable screen formats

Postby Antonio Linares » Wed Jun 01, 2016 9:45 pm

From your example:

Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resizeable screen formats

Postby TimStone » Wed Jun 01, 2016 9: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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Resizeable screen formats

Postby Antonio Linares » Wed Jun 01, 2016 10:21 pm

yes because they have different heights
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Resizeable screen formats

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 7 guests