Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2017, 09:22 AM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 375
Default Tooltip

I am trying to achieve ComboBox items Tool tip so far I tried

Code:
procedure TForm1.ComboBox1Select(Sender: TObject);
begin
  Case Combobox1.ItemIndex of
  0 : Combobox1.Hint:='aaaa';
  1 : Combobox1.Hint:='bbbbbb';
  2 : Combobox1.Hint:='ccc';
  end;
end;
But this not works
Reply With Quote
  #2  
Old 05-14-2017, 02:32 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,056
Default

I don't have Delphi right now but move your code to "OnItemSelect" event (if I can remember the right name).
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #3  
Old 05-14-2017, 02:59 PM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 375
Default

I am using Delphi 7 and there is no such event.
Reply With Quote
  #4  
Old 05-14-2017, 03:18 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,056
Default

Try "OnItemIndex".
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #5  
Old 05-14-2017, 04:45 PM
robert robert is offline
Senior Member
 
Join Date: Sep 2014
Posts: 375
Default

Quote:
Originally Posted by Jasser View Post
Try "OnItemIndex".
Still no such event as "OnItemIndex".
Reply With Quote
  #6  
Old 05-15-2017, 10:03 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,201
Default

2 easy options:
#1: OnChange event
#2: implement the CM_MOUSEENTER
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 05:51 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.