Hiding Native Title Bar
Posted: Thu Jun 26, 2014 1:56 am
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?
A place for LongRange Mobile developers to ask questions, give answers and share tips.
https://longrange.lansa.com.au/
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')
Code: Select all
*Request the Schema to be revisualized in Request_Revisualize_Schema subroutine
#LRNGSERVICES.SetSystem Name('SYS-REQUEST-REVISUALIZE-SCHEMA') To('Y')