Auto clear default text in a TEdit - delphi-7

I have a few TEdits on my form. When created they have default text in a gray font color. (e.g. "Surname" and "Name") See example below:
Their on click events causes the default text to be cleared and their font color to be set to black.
My Problem: When I use the tab key to switch between the TEdits the onClick event will not triggered so the TEdit will not be cleared and the font color will stay grey.
Any suggestions on how I can fix this will be appreciated!

Related

Why Does UITextField Frame Change When Toggling Secure Text Entry?

I have a UITextField that contains a trailing-edge button to toggle the text field's isSecureEntry value. The logic for toggling isSecureEntry works as expected, but the frame of the text field expands or contracts in height by a ~2.5 points when toggling isSecureEntry.
The two image assets used for the button measure 72x72 points, so I don't think the change is a result of changing the button's image.
We are using a custom font, so I thought that I may need to reset the font after each toggle of isSecureEntry (the text field's caret's height is also affected). The steps that I took follow:
I have subscribed to UITextField.textDidChangeNotifications in order to set the font after isSecureEntry is toggled, assuming that the change of characters would cause the notification to be posted, but that doesn't seem to happen because the breakpoint placed at the selector is not triggered.
I used the same logic to set the text field's font in the button's selector for the touchUpInside event, but that does't resolve the frame change either.
What may be causing the frame change of the text field when isSecureEntry is toggled?

Is it possible to change the default text of the small buttons on the dockPanel?

I have to change the text that appears by leaving the mouse over the DockPanel buttons. I have to write it in Italian.
Thankyou

How to set color for a button in Xcode7?

Hi Im new to Xcode7 and Swift2 and I am trying to change the color of the buttons I am adding to my storyboard. Is there a way to change the color of the button in Xcode7? All I see are options to change color of text and add background image to a button but no change button color.
A button has many parts / aspects, so what do you mean by the "button color"? You probably mean the button's background color. If you scroll down in the button's attributes inspector, you'll come to the background color. The reason it's so far down is that it's a View (UIView) property, not merely a button (UIButton) property.

Android - Custom textview which support text selection and underline

I want to make custom view or textview, which supports text selection and can also underline part of text string on long press and move-after-long-press events(drag to next line to underline) with different colors of underline. Undelined text can be clickable and get underlined text. I had tried to draw string in canvas and use SpannableString, UnderlineSpan and Clickable Span to draw underline and selection, But failed to get result as required.
Please help! Thank you in advance.

Table view cell, custom editor and editing frame

I am using a custom editor when editing the contents of a cell inside a Table view. From the docs I see that the custom editor has to be an NSTextView. So I put the text view in the document view, then I referenced it from the cell subclass through an IBOutlet in order to assign it as custom editor.
When doing all this, I can set the editor not to draw its background, but a thick white border is shown when the user edits that cell, and there is no way to remove it.
So I create the NSTextView programmatically, assigned it as the custom editor, and no white border is shown, but I can't change the background now, set it to clearColor, set the font, fontColor etc. I can't do anything with it. It is just a square with dark background and white text.
Is there something I am not doing? This is a bad approach?
Thank you.
The border is drawn by drawRect:, but I still don't know how to fix it by overriding drawRect:...
You may have a look at this link: http://www.cocoabuilder.com/archive/cocoa/129091-solved-re-disabling-nstableview-big-black-editing-box.html#129259

Resources