At 03:07 PM 4/17/2013, Frank Taylor wrote:

I have created a form for a touch screen that contains a dynamic number of
Bit Buttons with a dynamic caption on each button based on a view.  Got it
working perfectly (RB 9.5 latest Version)  Except when an account name has
the & character in it, Like Stavis & Sons The caption shows the accelerator
character (Stavis _Sons).   I am not seeing a setting under bit button (or
the other buttons, office,speed) to suppress the Accelerator Character.
Also RDocs does not list a property command. Speed is of the essence, and
I hate to have to go the next step of analyzing each name as it is pulled
in from the select statement and try to add an extra & to the variable.

Any ideas or is there a checkbox or property command I am missing for a
button ?


Frank,

Technically, "&" character is intended for accelerator (hot key) for all
buttons in R:BASE.

For Static Text, DB Label, or Variable Label, you do have an option to show
or not show the Accelerator Character. However, by design, there is no such
option for the caption for Push Button, Bit Button, Speed Button, or any
button, etc.

Having said that ...

In your specific situation when dynamically assigning the caption for any
button, you will have to add an additional "&" along with the existing "&"
to achieve the desired result.

Here's how:

Before defining the CAPTION property for button, use the SRPL function to
add additional "&" for any value that contains "&" value.

So, if used correctly, the Stavis & Sons will be replaced as "Stavis && Sons"
before using the PROPERTY btnCompID CAPTION value, and the actual button
caption will be displayed as "Stavis & Sons".

That is your tip of the day!

Let me know if you need an example to demonstrate the use of such technique.

Very Best R:egards,

Razzak.

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

Reply via email to