Solved

TextPrompt disappearing

Posted on 2013-12-27
4
671 Views
Last Modified: 2014-01-13
Hi,

I'm trying to setup a stylebook for my Delphi XE5 mobile firmonkey app and according to the DocWiki I'm selecting one of the supplied stylebooks and customizing that.

The problem is each one of the supplied stylebooks that I've tried causes the TextPrompt in my tEdit to disappear.

So why is it doing this and do I need to create a custom tEdit in order to have a TextPrompt?

Gary
0
Comment
Question by:Gary4
  • 3
4 Comments
 
LVL 13

Expert Comment

by:Ashok
ID: 39742588
Usually you can use SetFocus of a component name like

myComponent.SetFocus;

I do not have latest Delphi so I am not sure if this would work.
0
 
LVL 1

Author Comment

by:Gary4
ID: 39742642
I'm not sure how that would help.

The TextPrompt property with the default style functions almost identical to the placeholder attribute in an HTML input tag.  It displays a gray text prompt for the expected input when the control is empty whether it has focus or not.  It can be used in place of a label thus saving screen space on small screens.
0
 
LVL 1

Accepted Solution

by:
Gary4 earned 0 total points
ID: 39764776
The problem was that the supplied style-books didn't style the text prompt while the inbuilt default style did.  Not being styled the prompt was not viable..

Instead of using a full replacement style I extended the default style with my own customizations thus retaining the prompt style.
0
 
LVL 1

Author Closing Comment

by:Gary4
ID: 39776058
I found this workaround/solution on my own.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question