Page 1 of 2

Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 9:19 am
by driessen
Hello,

I use this line:
Code: Select all  Expand view
EDEFINE SAY PROMPT PAR->STOMSHAYS ID 500 OF ParDlg PICTURE "@X"
but I want it to be aligned to the right. In my resources this field is defined as right text, but my text is shown aligned to the left.

How can I align the text in the SAY command to the right?

Thank you.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 11:36 am
by Enrico Maria Giordano
ADD SS_RIGHT style to your STATIC resource.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 2:13 pm
by driessen
Enrico,

Thanks a lot for your message.

Is it possible to send a small example of how to do that?

Thanks.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 3:13 pm
by Enrico Maria Giordano
Here it is:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           RESOURCE "TEST"

    REDEFINE SAY PROMPT "This is right aligned";
             ID 101 OF oDlg

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


Code: Select all  Expand view
TEST DIALOG 0, 0, 300, 300
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "", 101, "STATIC", SS_RIGHT | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE, 40, 115, 240, 13
}

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 4:00 pm
by karinha
// C:\FWH\SAMPLES\ENRISAY.PRG

Code: Select all  Expand view

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, cText, aGrad, oFont

   cText := "Driessen: Enrico Maria Giordano - Style Right"

   DEFINE FONT oFont  NAME "Ms Sans Serif"  SIZE 00, -14 BOLD

   aGrad := { { 0.30, CLR_HGREEN, CLR_GREEN },{ 0.50, CLR_GREEN, CLR_HGREEN } }

   DEFINE DIALOG oDlg RESOURCE "TEST_SAY" GRADIENT aGrad

   oDlg:lHelpIcon := .F.

   REDEFINE SAY PROMPT cText ID 101 OF oDlg UPDATE FONT oFont                ;
      COLORS CLR_HRED, CLR_BLACK

   ACTIVATE DIALOG oDlg CENTERED

   oFont:End()

RETURN NIL
 


// FIN / END

// ENRISAY.RC

Code: Select all  Expand view

TEST_SAY DIALOG 155, 66, 300, 300
STYLE DS_ABSALIGN | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "FIVEWIN: RIGHT TEXT"
FONT 8, "MS Sans Serif"
{
 RTEXT "Text", 101, 25, 141, 250, 12, SS_RIGHT | NOT WS_GROUP
}
 


Regards, saludos.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 4:13 pm
by Enrico Maria Giordano
João, please avoid to always resubmit a slightly changed version of my (and others) samples, thank you.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 4:16 pm
by Enrico Maria Giordano
My samples are always designed to clearly demonstrate how to solve a specific problem and all you add is only confusion.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:29 pm
by karinha
Enrico Maria Giordano wrote:João, please avoid to always resubmit a slightly changed version of my (and others) samples, thank you.


Good afternoon Enrico. I don't know where there is confusion in the second example I sent. But if I offended you, I'm sorry. I didn't know you were so sensitive.

Buenas tardes Enrico. No sé dónde hay confusión en el segundo ejemplo que envié. Pero si te ofendí, lo siento. No sabía que eras tan sensible.

Gracias, thanks.

Regards, saludos.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:34 pm
by Enrico Maria Giordano
It is not matter of sensitivity. You added things (like gradient) that has nothing to do with the problem it solves. If you want to show your personal samples you are very welcome. But please, leave samples of others unchanged.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:39 pm
by karinha
Enrico Maria Giordano wrote:It is not matter of sensitivity. You added things (like gradient) that has nothing to do with the problem it solves. If you want to show your personal samples you are very welcome. But please, leave samples of others unchanged.


Calm down Enrico. When you are the OWNER of the forum, you can tell me what I can or cannot do. I made a model honoring you, I don't know why you were so sensitive, and I didn't even use offensive colors.

Tranquilo Enrique. Cuando seas PROPIETARIO del foro podrás decirme qué puedo o no hacer. Hice un modelo en honor a ti, no sé por qué eras tan sensible y ni siquiera usé colores ofensivos.

Gracias, thanks.

Regards, saludos.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:44 pm
by Enrico Maria Giordano
I am completely calm, you can be sure of that. I only want that my work is left unchanged. Am I asking too much?

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:49 pm
by karinha
Enrico Maria Giordano wrote:I am completely calm, you can be sure of that. I only want that my work is left unchanged. Am I asking too much?


Enrico, you're nervous for nothing. Your work is excellent. I only made a second sample using WORKSHOP.exe, at no point did the example offend you, I can modify it by adding GETS and BUTTONS and even so, the example remains yours. There is nothing in the program that offends you.

Enrico, estás nervioso por nada. Tu trabajo es excelente. Solo hice una segunda muestra usando WORKSHOP.exe, en ningún momento te ofendió el ejemplo, puedo modificarlo agregando GETS y BUTTONS y aun así el ejemplo sigue siendo tuyo. No hay nada en el programa que te ofenda.

Gracias, thanks.

Regards, saludos.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:55 pm
by Enrico Maria Giordano
I'm not nervous at all. If you can't accept the simple fact that one would want his/her own samples unchanged then please go on and do what you want. I stop responding. Thank you.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 6:59 pm
by karinha
Enrico Maria Giordano wrote:I'm not nervous at all. If you can't accept the simple fact that one would want his/her own samples unchanged then please go on and do what you want. I stop responding. Thank you.


Ok Enrico I understand. Please calm down.

Ok Enrico, lo entiendo. Por favor calmate.

Desculpas, sorry.

Gracias, Thanks.

Regards, saludos.

Re: Problem with alignment in SAY command

PostPosted: Fri Mar 01, 2024 9:24 pm
by Otto
Dear Joao,
I think complete samples are always of great help.
I also think it's good when design is incorporated into the examples, so you can see what all is possible.

Just for the solution, you can also directly click on it in the resource editor, which I think is even easier when someone uses resources.
Image


Joao, I often still think about the joint work on the appointment calendar, which is purely file-based, so completely without a database.
Do you also remember? It is my only GitHub project.
The design has been adapted by you.
Now, I will switch to webview—I'm referring to the part where you drag emails and document files onto the calendar. With webview, it's very easy to handle individual email files.
Simply drag the email from MS Outlook and drop it.
Best regards,
Otto

Image