Tuesday, March 27, 2018

Tip of the Day: DIALOG/PAUSE Accelerator Character Control
Product.......: R:BASE X and R:BASE X Enterprise (Version 10)
Build.........: 10.0.3.20320 or higher
Section.......: Commands
Keywords......: DIALOG, PAUSE, Accelerator Character, Message

Did you know a new parameter was added to the DIALOG and PAUSE commands to control the
accelerator character display within the message?

When displaying a message string which contains an ampersand for the DIALOG and PAUSE commands, the ampersand is treated as an accelerator character and is displayed as an underline. When constructing a string by concatenating variables and text, it is possible to add an additional "&" to fix the display. But, if that string is a part of a variable and text, such as customer name that includes "&", it must be handled accordingly.

The new MESSAGE_SHOW_ACCELERATOR_CHAR easily controls the accelerator character display
within the message. The default is ON.

-- Example (DIALOG with accelerator character OFF)
   SET VAR vYesNo TEXT = 'Yes'
   SET VAR vEndKey TEXT = NULL
   SET VAR vCaption TEXT = 'New Sales Order'
   CLS
   DIALOG +
'You have selected to process new sales order for Fenwick & Sons Maintenance.' +
   vYesNo vEndKey Yes +
   CAPTION .vCaption ICON QUESTION +
   OPTION WINDOW_BACK_COLOR WHITE +
   |MESSAGE_BACK_COLOR WHITE +
   |MESSAGE_FONT_NAME Tahoma +
   |MESSAGE_FONT_COLOR NAVY +
   |MESSAGE_FONT_SIZE 12 +
   |BUTTON_YES_CAPTION &Yes +
   |BUTTON_YES_COLOR WHITE +
   |BUTTON_YES_FONT_COLOR GREEN +
   |BUTTON_NO_CAPTION &No +
   |BUTTON_NO_COLOR WHITE +
   |BUTTON_NO_FONT_COLOR RED +
   |MESSAGE_SHOW_ACCELERATOR_CHAR OFF
IF vYesNo = 'No' OR vEndKey = '[Esc]' THEN
   GOTO Done
ENDIF
   CLS
   ENTER USING SalesOrder
LABEL Done
   CLEAR VARIABLES vYesNo,vEndKey,vCaption
   RETURN

   http://www.razzak.com/tips/PAUSE_Message.png

-- Example (PAUSE with accelerator character OFF)
   CLS
   PAUSE 2 USING +
   'New sales order for Fenwick & Sons Maintenance processed successfully!' +
   CAPTION 'New Sales Order' ICON CONFIRM +
   BUTTON 'Press any key to continue ...' +
   OPTION BACK_COLOR WHITE +
   |MESSAGE_FONT_NAME Tahoma +
   |MESSAGE_FONT_COLOR GREEN +
   |MESSAGE_FONT_SIZE 11 +
   |BUTTON_COLOR WHITE +
   |BUTTON_FONT_COLOR GREEN +
   |MESSAGE_SHOW_ACCELERATOR_CHAR OFF
   RETURN

   http://www.razzak.com/tips/PAUSE_Message.png

One of the most important aspects in business growth is your company's data, and no one else has more invested in your success than R:BASE Technologies. Invest forward with R:BASE!

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to