View Issue Details

IDProjectCategoryView StatusLast Update
0036000LazarusLCLpublic2019-08-24 01:42
ReporterCudaText manAssigned To 
Status newResolutionopen 
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0036000: Feature req: TCombobox.TextHint support
DescriptionTEdit supports TextHint prop, while TCombobox (in editable style) does not.
User or CudaText wants to show TextHint in his plugin dialog in combobox field.
Can you pls add it?
(maybe i can add it, not sure...)
TagsNo tags attached.
Fixed in Revision
Attached Files


jamie philbrook

2019-08-24 01:09

reporter   ~0117813

This will have to be a widget set change but in windows...

    A:UnicodeString = 'test';
 SendMessage(ComboBox1.Handle, $1703, 0, UintPtr(PWChar(A)));

 That puts CUeBanner text in the EDIT field when not in focus and has no content.

the $1703 is the CB_SETCUEBANNER message for windows Vista/7 and up.

$1501 could be XP, not sure about that one.

jamie philbrook

2019-08-24 01:42

reporter   ~0117814

This keeps the hint visible when focused if there is no text in the box.

    A:UnicodeString = 'test';
    info: TComboBoxInfo;
  Info.CbSize := SizeOf(Info);
  GetComboBoxInfo(ComboBox1.Handle, @info);
  //SendMessage(ComboBox1.Handle,{CB_SETCUEBANNER} $1703, 0, UintPtr(PWChar(A)));
  SendMessage(Info.hwndItem,{EM_SETCUEBANNER}$1501{ $1502=GET}, 1, UIntPtr(PWChar(A)));

Issue History

Date Modified Username Field Change
2019-08-23 21:01 CudaText man New Issue
2019-08-24 01:09 jamie philbrook Note Added: 0117813
2019-08-24 01:42 jamie philbrook Note Added: 0117814