Problem with alignment in SAY command

Problem with alignment in SAY command

Postby driessen » Fri Mar 01, 2024 9:19 am

Hello,

I use this line:
Code: Select all  Expand view  RUN
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.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 11:36 am

ADD SS_RIGHT style to your STATIC resource.
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby driessen » Fri Mar 01, 2024 2:13 pm

Enrico,

Thanks a lot for your message.

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

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 3:13 pm

Here it is:

Code: Select all  Expand view  RUN
#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  RUN
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
}
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby karinha » Fri Mar 01, 2024 4:00 pm

// C:\FWH\SAMPLES\ENRISAY.PRG

Code: Select all  Expand view  RUN

#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  RUN

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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7874
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 4:13 pm

João, please avoid to always resubmit a slightly changed version of my (and others) samples, thank you.
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 4:16 pm

My samples are always designed to clearly demonstrate how to solve a specific problem and all you add is only confusion.
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby karinha » Fri Mar 01, 2024 6:29 pm

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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7874
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 6:34 pm

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.
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby karinha » Fri Mar 01, 2024 6:39 pm

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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7874
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 6:44 pm

I am completely calm, you can be sure of that. I only want that my work is left unchanged. Am I asking too much?
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby karinha » Fri Mar 01, 2024 6:49 pm

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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7874
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with alignment in SAY command

Postby Enrico Maria Giordano » Fri Mar 01, 2024 6:55 pm

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.
User avatar
Enrico Maria Giordano
 
Posts: 8725
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problem with alignment in SAY command

Postby karinha » Fri Mar 01, 2024 6:59 pm

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.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7874
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with alignment in SAY command

Postby Otto » Fri Mar 01, 2024 9:24 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests