Hiding Native Title Bar
Hiding Native Title Bar
Is there any updated documentation on how to hide the native title bar in LR (LANSA)? Also, any examples on changing the other attributes like the colour of the bar?
-
Paul
Re: Hiding Native Title Bar
The updated section in the documentation is here;
http://www.longrangemobile.com/docs/lan ... interf.htm
There is an RPG example, EXAM0128, that covers the /SysState properties with important comments about each. See below this example for RDMLX equivelents.
/SysState property setting from EXAM0128
Request_Revisualize_Schema subroutine
In RDMLX the properties would be set in the following way;
Also see the Specifying Colors section in the programming guide for more information
http://www.longrangemobile.com/docs/lan ... colors.htm
.
http://www.longrangemobile.com/docs/lan ... interf.htm
There is an RPG example, EXAM0128, that covers the /SysState properties with important comments about each. See below this example for RDMLX equivelents.
/SysState property setting from EXAM0128
Code: Select all
/// The user has requested to show the home button
When ( RequestACTION = SHOW_HOME_BUTTON );
LRNG_SetBoolProperty('/SYSSTATES.HideHomeButton' : False);
MessageText = '/SYSSTATES.HideHomeButton is now false.';
/// The user has requested to hide the home button
When ( RequestACTION = HIDE_HOME_BUTTON );
LRNG_SetBoolProperty('/SYSSTATES.HideHomeButton' : True);
MessageText = '/SYSSTATES.HideHomeButton is now true.';
/// The user has requested to show the navigation bar
When ( RequestACTION = SHOW_NAVIGATION_BAR );
LRNG_SetBoolProperty('/SYSSTATES.HideTitleBar' : False);
MessageText = '/SYSSTATES.HideTitleBar is now false.';
/// The user has requested to hide the navigation bar
When ( RequestACTION = HIDE_NAVIGATION_BAR );
LRNG_SetBoolProperty('/SYSSTATES.HideTitleBar' : True);
MessageText = '/SYSSTATES.HideTitleBar is now true.';
/// The user has asked to set the navigation bar back color
/// This feature is not design to change the colors frequently.
/// Normally the color would be set once durng a schema (re)fresh.
When ( RequestACTION = SET_TOOLBAR_BACKCOLOR );
Color = '&'+%trim(Colors(EZI_GetRandomNumber(1:%elem(Colors))));
LRNG_SetProperty('/SYSSTATES.ToolBarBackColor' : Color);
Exsr Request_Revisualize_Schema;
MessageText = '/SYSSTATES.ToolBarBackColor set to '+Color;
/// The user has asked to reset the navigation bar back color
/// This feature is not design to change the colors frequently.
/// Normally the color would be set once durng a schema (re)fresh.
When ( RequestACTION = RESET_TOOLBAR_BACKCOLOR );
LRNG_AssignNullToProp('/SYSSTATES.ToolBarBackColor');
Exsr Request_Revisualize_Schema;
MessageText = '/SYSSTATES.ToolBarBackColor reset to null.';
/// The user has asked to set the navigation bar fore color
/// This feature is not design to change the colors frequently.
/// Normally the color would be set once durng a schema (re)fresh.
When ( RequestACTION = SET_TOOLBAR_FORECOLOR );
Color = '&'+%trim(Colors(EZI_GetRandomNumber(1:%elem(Colors))));
LRNG_SetProperty('/SYSSTATES.ToolBarForeColor' : Color);
Exsr Request_Revisualize_Schema;
MessageText = '/SYSSTATES.ToolBarForeColor set to '+Color;
/// The user has asked to reset the navigation bar fore color
/// This feature is not design to change the colors frequently.
/// Normally the color would be set once durng a schema (re)fresh.
When ( RequestACTION = RESET_TOOLBAR_FORECOLOR );
LRNG_AssignNullToProp('/SYSSTATES.ToolBarForeColor');
Exsr Request_Revisualize_Schema;
MessageText = '/SYSSTATES.ToolBarForeColor reset to null.';
Code: Select all
///O/// ----------------------------------------------------------------------
///O/// Ask the client to revisualize the schema because of a color change
///O/// ----------------------------------------------------------------------
Begsr Request_Revisualize_Schema;
LRNG_SetSystemValue('REQUEST-REVISUALIZE-SCHEMA' : 'Y');
EndSr;
Code: Select all
* Set Hide Homebutton to True (or False)
#COM_OWNER.Set Property('/SysStates.HideHomeButton') To(True)
* Set Hide Title Bar to True (or False)
#COM_OWNER.Set Property('/SysStates.HideTitleBar') To(True)
* Set the Title Bar background color
#COM_OWNER.Set Property('/SysStates.ToolBarBackColor') To(Grey)
* Reset the Title Bar background color
#COM_OWNER.Set_Null Property('/SysStates.ToolBarBackColor')
* Set the Title Bar foreground color
#COM_OWNER.Set Property('/SysStates.ToolBarForeColor') To(White)
* Reset the Title Bar foreground color
#COM_OWNER.Set_Null Property('/SysStates.ToolBarForeColor')
*Request the Schema to be revisualized in Request_Revisualize_Schema subroutine
#LRNGSERVICES.SetSystem Name('SYS-REQUEST-REVISUALIZE-SCHEMA') To('Y')
http://www.longrangemobile.com/docs/lan ... colors.htm
.
Re: Hiding Native Title Bar
Thanks Paul.
I'm curious, what does this line do?
I'm curious, what does this line do?
Code: Select all
*Request the Schema to be revisualized in Request_Revisualize_Schema subroutine
#LRNGSERVICES.SetSystem Name('SYS-REQUEST-REVISUALIZE-SCHEMA') To('Y')-
Paul
Re: Hiding Native Title Bar
This line causes the Schema to be re-loaded and re-visualized. This is required in this demonstration program because changes to any of the /SysStates color properties requires some redrawing (at least) of the screen to take effect.
We recommend that these properties, particularly the color properties, only be changed during a schema refresh. That would normally be in the Local Object Generator program. In this way the command to re-visualize the schema is not required.
We recommend that these properties, particularly the color properties, only be changed during a schema refresh. That would normally be in the Local Object Generator program. In this way the command to re-visualize the schema is not required.