1. Marcin Jurkowski
  2. PowerBuilder
  3. Thursday, 24 January 2019 12:11 PM UTC

Hi,

Is it possible to change date format on an editmask control?

When I try to save em_date.Mask = 'dd/mm/yy' I get an error:
"A readonly property can be modified only in an event or function in its parent class"

Is this normal?

Regards,
Marcin

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 25 January 2019 20:18 PM UTC
  2. PowerBuilder
  3. # 1

Hi Marcin;

  You cannot update that property is what the error message is about. If you open the PB IDE's Object Browser, you'll see that the "mask" property is marked "non-writable", as follows:

 

  You should be using the SetMask() method instead.

HTH

Regards ... Chris

 

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 25 January 2019 19:56 PM UTC
  2. PowerBuilder
  3. # 2

Go to the ancestor of the object in which you havew the EditControl to be modified.
Change the value of the mask in the ancestor in which the control is initially defined (it won;t be ReadOnly).

Just be aware that altering the parent object changes the mask for ALL of the descendants.


Olan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.