J
Jens Gyldenkærne Clausen
Hi group. I'm trying to program a Word 2007 Template with
ContentControls. On field exit (the Exiting event) I would like to
check if the user has changed the original value - and for this purpose
I thought the ShowingPlaceHolderText property would be just right.
However, it doesn't work as expected - no matter what I try, the
ShowingPlaceholderText property always returns false.
Some example code:
private void ThisDocument_Startup(object sender, System.EventArgs e)
{
myObj.PlaceholderText = myObj.Text;
bool a = stilling1.ShowingPlaceholderText;
bool b = (stilling1.Text == stilling1.PlaceholderText);
}
When debugging I get a==false and b==true - but I haven't got a clue of
why this is happening. I can of course just use the test behind bool b
to perform the check, but I would like to know if I'm missing something
or if the ShowingPlaceholderText property just isn't working correctly.
ContentControls. On field exit (the Exiting event) I would like to
check if the user has changed the original value - and for this purpose
I thought the ShowingPlaceHolderText property would be just right.
However, it doesn't work as expected - no matter what I try, the
ShowingPlaceholderText property always returns false.
Some example code:
private void ThisDocument_Startup(object sender, System.EventArgs e)
{
myObj.PlaceholderText = myObj.Text;
bool a = stilling1.ShowingPlaceholderText;
bool b = (stilling1.Text == stilling1.PlaceholderText);
}
When debugging I get a==false and b==true - but I haven't got a clue of
why this is happening. I can of course just use the test behind bool b
to perform the check, but I would like to know if I'm missing something
or if the ShowingPlaceholderText property just isn't working correctly.