Questions tagged [editcontrol]

Edit controls let a user view and edit text.

92 questions
11
votes
3 answers

Show tooltip on invalid input in edit control

I have subclassed edit control to accept only floating numbers. I would like to pop a tooltip when user makes an invalid input. The behavior I target is like the one edit control with ES_NUMBER has : So far I was able to implement tracking tooltip…
AlwaysLearningNewStuff
  • 2,649
  • 3
  • 21
  • 72
8
votes
1 answer

TEdit and WM_PAINT message handler strange behavior

I am trying to implement my own drawing on a TEdit control when it does not have focus (show ellipsis in TEdit when the editor doesn’t fully display its text). So I starאed with this code: type TEdit = class(StdCtrls.TEdit) private …
zig
  • 4,284
  • 1
  • 17
  • 53
8
votes
2 answers

Search icon in edit control overlapped by input area

I am trying to make a search edit control in MFC that has an icon displayed in the control window all the time (regardless the state and text of the control). I have written something like this many years ago and worked very well, but the code no…
Marius Bancila
  • 15,287
  • 7
  • 44
  • 84
7
votes
2 answers

Is it possible to determine if the text in a dbEdit is longer than what is visible?

On some forms I have dbEdits that sometimes aren't wide enough to show all the text their fields may contain. For them I have the following code: procedure Tgm12edLots.dbeLotNameMouseEnter(Sender: TObject); begin with dbeLotName do begin …
skippix
  • 451
  • 1
  • 5
  • 13
7
votes
1 answer

Is it possible to change the background color of a read only edit control

I've been trying to find a simple solution to change the color of an edit control that has the ES_READONLY flag. The code I have (sort of) works when the edit control is editable, however has no effect on my edit control that has the read only…
Vince
  • 2,214
  • 9
  • 34
  • 66
6
votes
4 answers

How to disable copy/paste commands in the Windows edit control context menu?

How can I disable those 3 standard cut/copy/paste commands in the context menu of the native Windows OS edit control? I also need to disable the equivalent clipboard-related commands like CTRL+C/CTRL+V. Is there a special edit control style or…
TecMan
  • 2,347
  • 2
  • 25
  • 57
6
votes
2 answers

Delphi XE8: TEdit TextHint Disappears When Receiving Focus

Basically, I want the TextHint of my TEdits to disappear when the first character is entered and not when they receive focus, like the Edits on this Microsoft page: Sign in to your Microsoft account. Can someone please walk me through on how to…
5
votes
2 answers

Why my edit control looks odd in my win32 c++ application using no MFC?

I have this program where i created a window and inside that i added an edit control using plain C (no MFC or dialogs), the edit control creation code is as hWnd=::CreateWindowExA(NULL, //no extended style "EDIT", …
smit
  • 779
  • 1
  • 7
  • 19
4
votes
1 answer

How to offset the position of the cursor in an edit control?

I'm building a custom edit control which consists of adding both an icon at the left and an icon button at the right, both inside the edit control. This requires shifting the starting point of the text (and cursor) to the right by X amount of…
Jerry Dodge
  • 25,720
  • 28
  • 139
  • 301
4
votes
6 answers

How to turn off beeping when pressing ENTER on a single-line EDIT control under Windows CE?

I'm developing an application targeted to a POCKET PC 2003 (Windows CE 4.2) device using C++ and native WINAPI (i.e. no MFC or the like). In it I have a single-line edit control which part of the main window (not a dialog); hence the normal…
gablin
  • 4,440
  • 5
  • 29
  • 47
4
votes
2 answers

WINAPI Edit control with custom border

what is the proper way of implementing custom rounded border for EDIT control in pure WinAPI (no MFC)? I need an edit with border like this: Should I subclass edit control and do custom painting in WM_NCPAINT or something like that?
mbg033
  • 481
  • 4
  • 17
4
votes
2 answers

Locale aware edit control subclassing for decimal numbers ( format [sign] [xxx...] [decimal separator] [yy...] )

INTRODUCTION AND RELEVANT INFORMATION: I have an edit control that should accept only signed decimal numbers-something like -123.456. Also, it should be locale aware, since decimal separator is not the same for every country-in US dot is used, while…
AlwaysLearningNewStuff
  • 2,649
  • 3
  • 21
  • 72
3
votes
1 answer

Remove the limit on the number of characters that can be entered into a Win32 Edit control

I've searched everywhere and it seems I can't find a solution to this problem.. My problem isn't limiting the amount of characters that can be entered into an edit control, my problem is I am limited by the size of the edit control. I want to be…
JohnDoe202
  • 33
  • 3
3
votes
2 answers

Delphi XE7: TEdit TextHint Color

i would like to change to gray color of the Texthint of my TEdits. I allready found this https://stackoverflow.com/a/31550017/1862576 and tried to change to color via SendMessage like this procedure TEdit.DoSetTextHint(const Value: string); var …
Philipp H.
  • 552
  • 1
  • 3
  • 18
3
votes
1 answer

Input validation of a subclassed edit control to only accept floating point numbers

On my current project I have been struggling the last couple of days with subclassing edit boxes. By now I successfully subclassed my edit box and validated the input such that it only accepts digits, commas, a minus sign and keyboard commands. But…
0x492559F64E
  • 124
  • 1
  • 13
1
2 3 4 5 6 7