1. Paweł Kasperek
  2. PowerBuilder
  3. Friday, 15 September 2023 10:44 AM UTC

Hi,

How can I add and set the Placeholder property in editmask control? Of course, I can put text value and manipulate it in edit mask control. But maybe it exists a simple solution.

 

Regards,

Pawel

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 13:58 PM UTC
  2. PowerBuilder
  3. # Permalink

Which version of powerbuilder?

I think the placeholder is only for single line edit controls, but have not used it sofar, so I might be wrong, but if not, I'm wondering why this property hasn't been added to datawindow columns too.

Just assign the value you want, as an example:

sle_1.PlaceHolder = "Initial value"

I haven't tried it myself, but the property is not write protected, so it should work.

regards

Comment
  1. John Fauss
  2. Friday, 15 September 2023 14:19 PM UTC
Miguel is correct - The Placeholder property exists only for SingleLineEdit controls. You can verify this in PB Help if you examine the topic named "Placeholder property for PowerScript controls".
  1. Helpful 1
  1. Miguel Leeuwe
  2. Friday, 15 September 2023 14:30 PM UTC
Thanks John,

They've added a nice feature to the "least used object" (at least in my applications). We mostly use datawindows everywhere, but even if so, Appeon could have added this attribute also to the multiline edit control (of which the edit mask control seems to be inherited).

regards.
  1. Helpful 1
  1. Paweł Kasperek
  2. Sunday, 17 September 2023 17:59 PM UTC
Hi,



I know that Placeholder exists only for SingleLineEdit, but I could use EditMask control and it doesn't have this property. Something we can use mask property and placeholder together, so currently it isn't possible in PB.



Regards,

Pawel
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 15:17 PM UTC
  2. PowerBuilder
  3. # 1

Hi Pawel et Al;

  Yes, I wish other data entry controls also supported the PlaceHolder (aka "Hint Text") feature!   :-(

As an alternate suggestion though ... my STD Framework implements PowerTip Text on every control, Something that native PB does not (unfortunately) on most object classes.

Here is an example from my OrderEntry Demo App (just hovering the mouse over a few controls) ...

The above works in native PB Apps, PowerClient and PowerServer based Apps as well!  You are most welcome to borrow the code as the framework is free & open source.  ;-)

FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry

Regards ... Chris

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.