Support Forum

Forum

Subscribe for automatic updates: RSS icon RSS, Mail icon email notifications (digest, mailing list).

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Button Styles  (Read 5403 times)
0 Members and 1 Guest are viewing this topic.
Zack D.
Posts: 3


« on: June 30, 2015, 01:07:17 pm »

Is it possible to change the button style in genera mobile?
Lionel F.
Four Js
Posts: 3


« Reply #1 on: July 02, 2015, 03:42:13 pm »

Hi Zack,

Normally basic style attributes such as backgroundColor, textColor or else font style attributes should be supported.
Now, if you're talking about a dynamic change during the runtime, it's not yet supported on GMI (existing issue GMI#212) but should be supported in the next GMA version (issue GMA#452).

Best regards,
Lionel
Zack D.
Posts: 3


« Reply #2 on: July 03, 2015, 09:06:01 am »

Cool, Do 4J's have a full list of the styles that can be applied? (not just buttons) as the manual seems limited.
Lionel F.
Four Js
Posts: 3


« Reply #3 on: July 07, 2015, 01:44:18 pm »

Hi Zack,

Did you see this list from the BDL manual 2.51 ?
http://www.generomobile.com/online_documentation/fjs-fgl-manual/#c_fgl_presentation_styles_019.html

It mentions each style attribute by items and, for each front-end client (GDC/HTML5/GMA/GMI), whether it's available or not.

Best regards,
Lionel
Reuben B.
Four Js
Posts: 11


« Reply #4 on: July 07, 2015, 10:31:08 pm »

A common mistake people make reading that section of the documentation Lionel pointed at is to just read the section related to the widget you are looking at. e.g. in the case of Buttons this section http://www.generomobile.com/online_documentation/fjs-fgl-manual/#r_fgl_presentation_styles_button_style_attributes.html.

What you should also do is make sure you read the "Common" section which applies to all widgets and containers http://www.generomobile.com/online_documentation/fjs-fgl-manual/#r_fgl_presentation_styles_common_style_attributes.html

So you wont see backgroundColor in the Button section, you will however see it in the Common section.

As the common section applies to all widgets and containers, there are times where the blanket "Yes" should really be a Yes(*) and a note added to indicate what O/S may not support a particular feature. 

If in doubt create a small example like this ...

button.4gl
Code
  1. MAIN
  2.    CALL ui.Interface.loadStyles("button.4st")
  3.    OPEN WINDOW w WITH FORM "button"
  4.    MENU ""
  5.        ON ACTION red
  6.            MESSAGE "Red"
  7.        ON ACTION orange
  8.            MESSAGE "Orange"
  9.        ON ACTION green
  10.            MESSAGE "Green"
  11.    END MENU
  12. END MAIN


button.per
Code
  1. LAYOUT
  2. GRID
  3. {
  4. [b01        ]
  5. [b02        ]
  6. [b03        ]
  7. }
  8. END
  9. END
  10. ATTRIBUTES
  11. BUTTON b01: red, TEXT="Red", STYLE="red";
  12. BUTTON b02: orange, TEXT="Orange", STYLE="orange";
  13. BUTTON b03: green, TEXT="Green", STYLE="green";
  14.  

button.4st
Code
  1. <?xml version="1.0" encoding="ANSI_X3.4-1968"?>
  2. <StyleList>
  3.  <Style name="Button.red">
  4.     <StyleAttribute name="backgroundColor" value="red" />
  5.  </Style>
  6.  <Style name="Button.orange">
  7.     <StyleAttribute name="backgroundColor" value="orange" />
  8.  </Style>
  9.  <Style name="Button.green">
  10.     <StyleAttribute name="backgroundColor" value="green" />
  11.  </Style>
  12. </StyleList>

... then if the program isn't doing what you expect, you can pass it your support contract, or post it here

Hope that helps,

Reuben

Reuben Barclay
Technical Consultant - Four Js Asia Pacific
Blue J Software www.bluejs.com
Zack D.
Posts: 3


« Reply #5 on: July 29, 2015, 10:26:09 am »

Thank you Reuben and Lionel, Sorry its taken so long to reply.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines