Hi all,
I have run into something I can not figure out.
I have a label on a form
I have a customer`s name "G&G name"
when I say form.label.value := "Customer: "+customer->name
the label will not show the & the labels value becomes GG name.
any ideas;
Thanx .. Franco
& in label
Moderator: Rathinagiri
& in label
All The Best,
Franco
Canada
Franco
Canada
Re: & in label
Transform & to && before writing to label value
Code: Select all
form.label.value := "Customer: "+strtran(customer->name, "&", "&&")
Re: & in label
Hello Franco,
Try to add the NOPREFIX clause to your Label definition.
Hope that helps
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: & in label
Merek, this solved my problem. Thank you
Grigory I tried to add this but does not work for me . Where exactly do you add this clause.
Thanks again ......... Franco
Grigory I tried to add this but does not work for me . Where exactly do you add this clause.
Thanks again ......... Franco
All The Best,
Franco
Canada
Franco
Canada
Re: & in label
Franco
Here is an example:
Here is an example:
Code: Select all
#include "hmg.ch"
MEMVAR _HMG_SYSDATA
FUNCTION Main()
LOCAL cText := "G&G name"
DEFINE WINDOW MainWnd;
ROW 100;
COL 100;
WIDTH 180;
HEIGHT 120;
TITLE "NOPREFIX label";
MAIN;
NOSIZE;
NOMINIMIZE;
NOMAXIMIZE
DEFINE LABEL Text1
ROW 20
COL 20
WIDTH 140
VALUE cText
NOPREFIX .F.
END LABEL
DEFINE LABEL Text2
ROW 50
COL 20
WIDTH 140
VALUE cText
NOPREFIX .T.
END LABEL
END WINDOW
MainWnd.ACTIVATE
RETURN NIL