Page 1 of 1

[RPG]Label button textalign:center with specifying width

Posted: Tue Jan 30, 2018 4:25 pm
by MegumiSawada
Hi,

I'm using a label element with Onclick property so that I can use it as a button.
I have set Layout.Width: 100 as well as Layout.cols: -1 and Textalign: center, and I thought it would result as follows;
Image-2.jpg
Image-2.jpg (13.42 KiB) Viewed 3447 times
However the result is as follows;
Image-1.jpg
Image-1.jpg (13.37 KiB) Viewed 3447 times
How can I acheieve what I expect (the first pic)?

Code: Select all

5 20HTML('<<LBLBTN>>      
     Type : LABEL         
     BACKCOLOR: BLUE      
     COLOR:WHITE          
     TEXT : Push     
     LAYOUT.COLS: -1      
     LAYOUT.WIDTH : 100   
     TEXTALIGN: CENTER    
     ONCLICK: BTN1CLK
     ')
     
I appreciate your kind advice.

Best Regards,
Megumi Sawada

Re: [RPG]Label button textalign:center with specifying width

Posted: Tue Jan 30, 2018 5:03 pm
by jasonzhou
Please try the following code

Code: Select all

     A                                 26 20HTML('<<FORM3>>
     A                                      Type: Form
     A                                      LAYOUT.COLS: -1
     A                                      Grid.HAlign: Center
     A                                      Fields.Label
     A                                      (
     A                                          Type : LABEL
     A                                          BACKCOLOR: BLUE
     A                                          COLOR:WHITE
     A                                          TEXT : Push
     A                                          LAYOUT.WIDTH : 100
     A                                          TEXTALIGN: CENTER
     A                                          ONCLICK: BTN1CLK
     A                                      )
     A                                      ')


Re: [RPG]Label button textalign:center with specifying width

Posted: Tue Jan 30, 2018 5:42 pm
by MegumiSawada
Hi Jason,

It works!
OK, then, I need to use subform to do this...

Best Regards,
Megumi