Solved

Links in a TMemo or TRichEdit

Posted on 2000-05-05
21
331 Views
Last Modified: 2010-04-04
Hello,

I am looking for a way to have some kind of link in a memo.  There should be normal black text along with some links in underlined blue that show a hand cursor when the mouse is over it.

Basically, I'm trying to do the same effect that Outlook Express 5 does with message rules.  Another example is the triggers editor with the Starcraft campaign editor from Blizzard.

The application I am using this for is an AI editor for an online role playing game (with graphics positions open).

Events: List of events.  ie/ onAttack, etc.

Conditions: List of requirements.  ie/ possession of keys.

Actions: Result of event.  ie/ Deal damage, given an item, etc.

Rule Description: The box that puts it all together in a readable form.  (Others were checkboxes.)

When 'Event' happens,
If 'Condition'
  'and/or' If 'Condition'
  'and/or' if 'Condition'
Then do 'action'
  and 'action'

Example of an NPC character in game:
When 'attacked'
If attacker has level 'greater then' '20'
Then 'run away'

All items in quotes would actually be a link that would bring up another window or popup menu of choices.

Thanks,
Steven J. Morales
0
Comment
Question by:arcrotty
  • 13
  • 4
  • 2
  • +2
21 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 2782607
I think TRxRichEdit from www.rxlib.com can do that.


Regards,

Epsylon.
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 600 total points
ID: 2782620
TParamList from www.tmssoftware.com does it for sure.
0
 

Author Comment

by:arcrotty
ID: 2782629
Thanks Epsylon for the extremely quick response.  I will look both over and award points if everything is ok.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2782630
They even refer to it!


quote:

TParamListbox is an input box where the user can easily set several parameters through inplace clicking, like in the Outlook Rules Wizard. Parameters can be set through a custom interface or through selection from a listbox. Supports mouse & keyboard interface. Parameters can be automatically loaded and saved in registry or INI files.
0
 

Author Comment

by:arcrotty
ID: 2782746
I looked at the Rx one and could not find how to do it.  It also did not install cleanly.

All I need is a simple link to an object or Action (from Actionlist) or something similiar.  

I'm off to check the tmsoftware now.  
0
 

Author Comment

by:arcrotty
ID: 2782808
Ok, this is the problem I am currently having with TParamlistbox.  I am unable to install the component to try it out.  It does, have a DCU, but I don't think you can install a DCU so that you can have a visual component, I may be wrong.

It does, however, look promising if I can get it to work.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2782841
Did you add 'Parlreg.pas' to a custom package?

From the Paramlst.txt file:

        1. In the delphi menu select:
               Component >  Install > Add > Browse

        2. Select parlreg.pas and accept.



It works fine for me in Delphi 5.
0
 

Author Comment

by:arcrotty
ID: 2782871
Ok, this is the problem I am currently having with TParamlistbox.  I am unable to install the component to try it out.  It does, have a DCU, but I don't think you can install a DCU so that you can have a visual component, I may be wrong.

It does, however, look promising if I can get it to work.
0
 

Author Comment

by:arcrotty
ID: 2782884
Epsylon,

I figured out how to install it.  Also looked at it extensively just now.

It uses a parameter based system.  I may be able to use it.  It's not really what I was looking for in an interface, but it looks usable.

I'm gonna leave this up for a day or two to see if someone can come up with something better.

Thanks,
Steve

PS-If something better does shows up, I will still give you 250 points for the effort.
0
 

Author Comment

by:arcrotty
ID: 2782975
After looking at it in great detail, I noticed it's limitations.

Being an index based method, it makes me have to do more work at what is on that line.

The application I am creating with it requires that conditions are added and taken away with a simple click.

I could get it to work the way it is by assigning a different value to each condition and action.  The problem I'd have if I want more then one of the same type of condition/action.

I'd have to write a complex lookup table for each object pertaining to each index returned.  It is more work then it would be worth.

If it returned atleast the line number of the clicked item, or an object associated with that line, it would be a lot easier to work with.

It looks great for static variables, but would require much work to deal with variants.

However, it it's all I have to work with, I could contact the author to see if we could work out a deal.

Otherwise, if it doesn't exit, I may just end up writing it myself.

Also, I noticed some bugs in it where it doesn't re-initialize all of the values correctly.  (when there are more then 10 items?)
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Expert Comment

by:rowisoft
ID: 2783662
Hy!

http://www.balticsolutions.com/files/cm2x.exe
can do what you want!! There is an example in the zip, too!!

Look at it!

Robert Wismet

PS: You can making syntax-highlighting with it, too!



0
 
LVL 10

Expert Comment

by:Lischke
ID: 2784610
now I'm curious...
0
 

Author Comment

by:arcrotty
ID: 2789899
rowisosoft,

Your component looks very good, but it is very limiting, even more so then tmsoftware.  It gives a hotspot that returns only the word clicked.  I want to be able to change words in the memo to other words.  I need a way for it to return a line number, or object or pointer associated with the line.  Plus, there will also be many items that will have the same string value and you have no way of distinguishing between them.

In short, sorry but I regretfully cannot use it in it's present form.  If you want to give me the source, It looks like it could be adopted very easily to do what I want.  
0
 

Author Comment

by:arcrotty
ID: 2789917
Adjusted points from 500 to 550
0
 

Author Comment

by:arcrotty
ID: 2789918
Okay, working off a tip from one of my friends, I heard that the window's API richedit has this feature, but was not included in the delphi component.

I only meantion this to see if it jogs anyone's memory.
0
 
LVL 4

Expert Comment

by:Radler
ID: 2793532
Listening...
0
 

Author Comment

by:arcrotty
ID: 2794137
What does this thread have an audience?  :)
0
 

Author Comment

by:arcrotty
ID: 2794141
Adjusted points from 550 to 575
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2794667
Hi Steven,

well, since nobody mentioned RichEdit98 I'll do it now. This control has some where interesting properties like AutoURLDetect and events like OnURLClick.

The latest version (1.4) is from Feb. 1999, comes with source code, is freeware and can be downloaded from www.delphipages.com (use the search facility, that's the easiest way).

Ciao, Mike
0
 

Author Comment

by:arcrotty
ID: 2798001
Adjusted points from 575 to 600
0
 

Author Comment

by:arcrotty
ID: 2798016
Mike,

The thing is, I need it to point to an object rather then a link.

Well so far the best thing I've found is at www.tmssoftware.com which I may end up using with a little tweaking.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now