[RPG]Label button textalign:center with specifying width

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

[RPG]Label button textalign:center with specifying width

Post 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 3443 times
However the result is as follows;
Image-1.jpg
Image-1.jpg (13.37 KiB) Viewed 3443 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
jasonzhou
Posts: 130
Joined: Wed Jan 11, 2017 3:26 pm

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

Post 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                                      ')

MegumiSawada
Posts: 268
Joined: Tue Feb 19, 2013 5:18 pm

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

Post by MegumiSawada »

Hi Jason,

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

Best Regards,
Megumi
Post Reply