Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to make InstantHelp Posted by dubi on 26 Dec 2005 at 8:27 PM
In Delphi IDE,the editor pops up a InstantHint or Help
when we type a function name.
For example,if we type 'SendMessage(',
then instantly we get a help popup of the funtion parameters.
This Functionaly is true for our user defined functions also.
I like to add this InstantHelp functionality in the editor of
current application I am working in(also developed in Delphi).

I tried THintWindow,it works goods.
But the text in THintWindow object cannot be highlighted as it
is done in Delphi IDE Editor.
i.e cannot highlight which parameter of the function we type.
Can we draw text of different colors in THintWindow object's canvas.
Like
MyFunction(ChannelNo: Integer,Mode: Integer)
MyFunction(ChannelNo: Integer,Mode: Integer)

Many thanks for your suggestions.
Report
Re: How to make InstantHelp Posted by zibadian on 26 Dec 2005 at 9:08 PM
: In Delphi IDE,the editor pops up a InstantHint or Help
: when we type a function name.
: For example,if we type 'SendMessage(',
: then instantly we get a help popup of the funtion parameters.
: This Functionaly is true for our user defined functions also.
: I like to add this InstantHelp functionality in the editor of
: current application I am working in(also developed in Delphi).
:
: I tried THintWindow,it works goods.
: But the text in THintWindow object cannot be highlighted as it
: is done in Delphi IDE Editor.
: i.e cannot highlight which parameter of the function we type.
: Can we draw text of different colors in THintWindow object's canvas.
: Like
: MyFunction(ChannelNo: Integer,Mode: Integer)
: MyFunction(ChannelNo: Integer,Mode: Integer)
:
: Many thanks for your suggestions.
:
It is possible to create your own hintwindow by designing a descendant of the THintWindow control, which has a custom Paint() method. This window must then be registered using the HintWindowClass.
Report
Re: How to make InstantHelp Posted by dubi on 27 Dec 2005 at 10:59 PM
: : In Delphi IDE,the editor pops up a InstantHint or Help
: : when we type a function name.
: : For example,if we type 'SendMessage(',
: : then instantly we get a help popup of the funtion parameters.
: : This Functionaly is true for our user defined functions also.
: : I like to add this InstantHelp functionality in the editor of
: : current application I am working in(also developed in Delphi).
: :
: : I tried THintWindow,it works goods.
: : But the text in THintWindow object cannot be highlighted as it
: : is done in Delphi IDE Editor.
: : i.e cannot highlight which parameter of the function we type.
: : Can we draw text of different colors in THintWindow object's canvas.
: : Like
: : MyFunction(ChannelNo: Integer,Mode: Integer)
: : MyFunction(ChannelNo: Integer,Mode: Integer)
: :
: : Many thanks for your suggestions.
: :
: It is possible to create your own hintwindow by designing a descendant of the THintWindow control, which has a custom Paint() method. This window must then be registered using the HintWindowClass.
:

Yes,I have done as you said,creating descendant of THintWindow.
But my question is how to Paint or Draw different colors of
text in the THintWindow descendant.
The text I display is only of one color.
How to show text of different colors(if possible Bold) in the Canvas of THintWindow descendant.
Report
Re: How to make InstantHelp Posted by zibadian on 27 Dec 2005 at 11:49 PM
: : : In Delphi IDE,the editor pops up a InstantHint or Help
: : : when we type a function name.
: : : For example,if we type 'SendMessage(',
: : : then instantly we get a help popup of the funtion parameters.
: : : This Functionaly is true for our user defined functions also.
: : : I like to add this InstantHelp functionality in the editor of
: : : current application I am working in(also developed in Delphi).
: : :
: : : I tried THintWindow,it works goods.
: : : But the text in THintWindow object cannot be highlighted as it
: : : is done in Delphi IDE Editor.
: : : i.e cannot highlight which parameter of the function we type.
: : : Can we draw text of different colors in THintWindow object's canvas.
: : : Like
: : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : :
: : : Many thanks for your suggestions.
: : :
: : It is possible to create your own hintwindow by designing a descendant of the THintWindow control, which has a custom Paint() method. This window must then be registered using the HintWindowClass.
: :
:
: Yes,I have done as you said,creating descendant of THintWindow.
: But my question is how to Paint or Draw different colors of
: text in the THintWindow descendant.
: The text I display is only of one color.
: How to show text of different colors(if possible Bold) in the Canvas of THintWindow descendant.
:
Change the properties of the TCanvas.Font object before you call one of the TextXXXX() methods.
Report
Re: How to make InstantHelp Posted by dubi on 28 Dec 2005 at 11:45 PM
: : : : In Delphi IDE,the editor pops up a InstantHint or Help
: : : : when we type a function name.
: : : : For example,if we type 'SendMessage(',
: : : : then instantly we get a help popup of the funtion parameters.
: : : : This Functionaly is true for our user defined functions also.
: : : : I like to add this InstantHelp functionality in the editor of
: : : : current application I am working in(also developed in Delphi).
: : : :
: : : : I tried THintWindow,it works goods.
: : : : But the text in THintWindow object cannot be highlighted as it
: : : : is done in Delphi IDE Editor.
: : : : i.e cannot highlight which parameter of the function we type.
: : : : Can we draw text of different colors in THintWindow object's canvas.
: : : : Like
: : : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : :
: : : : Many thanks for your suggestions.
: : : :
: : : It is possible to create your own hintwindow by designing a descendant of the THintWindow control, which has a custom Paint() method. This window must then be registered using the HintWindowClass.
: : :
: :
: : Yes,I have done as you said,creating descendant of THintWindow.
: : But my question is how to Paint or Draw different colors of
: : text in the THintWindow descendant.
: : The text I display is only of one color.
: : How to show text of different colors(if possible Bold) in the Canvas of THintWindow descendant.
: :
: Change the properties of the TCanvas.Font object before you call one of the TextXXXX() methods.
:

But that will change the entire text in the Canvas.
Like
SendMessage(hWnd:HWND;Msg:Cardinal;wParam:Integer;lParam:Integer)
and NOT like
SendMessage(hWnd:HWND;Msg:Cardinal;wParam:Integer;lParam:Integer)

Report
Re: How to make InstantHelp Posted by zibadian on 29 Dec 2005 at 3:41 PM
: : : : : In Delphi IDE,the editor pops up a InstantHint or Help
: : : : : when we type a function name.
: : : : : For example,if we type 'SendMessage(',
: : : : : then instantly we get a help popup of the funtion parameters.
: : : : : This Functionaly is true for our user defined functions also.
: : : : : I like to add this InstantHelp functionality in the editor of
: : : : : current application I am working in(also developed in Delphi).
: : : : :
: : : : : I tried THintWindow,it works goods.
: : : : : But the text in THintWindow object cannot be highlighted as it
: : : : : is done in Delphi IDE Editor.
: : : : : i.e cannot highlight which parameter of the function we type.
: : : : : Can we draw text of different colors in THintWindow object's canvas.
: : : : : Like
: : : : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : : :
: : : : : Many thanks for your suggestions.
: : : : :
: : : : It is possible to create your own hintwindow by designing a descendant of the THintWindow control, which has a custom Paint() method. This window must then be registered using the HintWindowClass.
: : : :
: : :
: : : Yes,I have done as you said,creating descendant of THintWindow.
: : : But my question is how to Paint or Draw different colors of
: : : text in the THintWindow descendant.
: : : The text I display is only of one color.
: : : How to show text of different colors(if possible Bold) in the Canvas of THintWindow descendant.
: : :
: : Change the properties of the TCanvas.Font object before you call one of the TextXXXX() methods.
: :
:
: But that will change the entire text in the Canvas.
: Like
: SendMessage(hWnd:HWND;Msg:Cardinal;wParam:Integer;lParam:Integer)
: and NOT like
: SendMessage(hWnd:HWND;Msg:Cardinal;wParam:Integer;lParam:Integer)
:
:
I've tested a code like this, and it worked like the way you want:
procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
  PaintBox1.Canvas.TextOut(10,10,'Hello');
  PaintBox1.Canvas.Font.Style := [fsBold];
  PaintBox1.Canvas.TextOut(10,30,'Hello');
end;

It shows the second hello in bold, while the first remained normal.
Report
Re: How to make InstantHelp Posted by dubi on 30 Dec 2005 at 12:05 AM
: : : : : : In Delphi IDE,the editor pops up a InstantHint or Help
: : : : : : when we type a function name.
: : : : : : For example,if we type 'SendMessage(',
: : : : : : then instantly we get a help popup of the funtion parameters.
: : : : : : This Functionaly is true for our user defined functions also.
: : : : : : I like to add this InstantHelp functionality in the editor of
: : : : : : current application I am working in(also developed in Delphi).
: : : : : :
: : : : : : I tried THintWindow,it works goods.
: : : : : : But the text in THintWindow object cannot be highlighted as it
: : : : : : is done in Delphi IDE Editor.
: : : : : : i.e cannot highlight which parameter of the function we type.
: : : : : : Can we draw text of different colors in THintWindow object's canvas.
: : : : : : Like
: : : : : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : : : : MyFunction(ChannelNo: Integer,Mode: Integer)
: : : : : :
: : : : : : Many thanks for your suggestions.
: : : : : :
: : : : : It is possible to create your own hintwindow by designing a descendant of the THintWindow control, which has a custom Paint() method. This window must then be registered using the HintWindowClass.
: : : : :
: : : :
: : : : Yes,I have done as you said,creating descendant of THintWindow.
: : : : But my question is how to Paint or Draw different colors of
: : : : text in the THintWindow descendant.
: : : : The text I display is only of one color.
: : : : How to show text of different colors(if possible Bold) in the Canvas of THintWindow descendant.
: : : :
: : : Change the properties of the TCanvas.Font object before you call one of the TextXXXX() methods.
: : :
: :
: : But that will change the entire text in the Canvas.
: : Like
: : SendMessage(hWnd:HWND;Msg:Cardinal;wParam:Integer;lParam:Integer)
: : and NOT like
: : SendMessage(hWnd:HWND;Msg:Cardinal;wParam:Integer;lParam:Integer)
: :
: :
: I've tested a code like this, and it worked like the way you want:
:
: procedure TForm1.PaintBox1Paint(Sender: TObject);
: begin
:   PaintBox1.Canvas.TextOut(10,10,'Hello');
:   PaintBox1.Canvas.Font.Style := [fsBold];
:   PaintBox1.Canvas.TextOut(10,30,'Hello');
: end;
: 

: It shows the second hello in bold, while the first remained normal.
:
Thanks a lot friend.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.