Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Links in a TMemo or TRichEdit

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
arcrotty
Asked:
arcrotty
  • 13
  • 4
  • 2
  • +2
1 Solution
 
EpsylonCommented:
I think TRxRichEdit from www.rxlib.com can do that.


Regards,

Epsylon.
0
 
EpsylonCommented:
TParamList from www.tmssoftware.com does it for sure.
0
 
arcrottyAuthor Commented:
Thanks Epsylon for the extremely quick response.  I will look both over and award points if everything is ok.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
EpsylonCommented:
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
 
arcrottyAuthor Commented:
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
 
arcrottyAuthor Commented:
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
 
EpsylonCommented:
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
 
arcrottyAuthor Commented:
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
 
arcrottyAuthor Commented:
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
 
arcrottyAuthor Commented:
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
 
rowisoftCommented:
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
 
LischkeCommented:
now I'm curious...
0
 
arcrottyAuthor Commented:
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
 
arcrottyAuthor Commented:
Adjusted points from 500 to 550
0
 
arcrottyAuthor Commented:
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
 
RadlerCommented:
Listening...
0
 
arcrottyAuthor Commented:
What does this thread have an audience?  :)
0
 
arcrottyAuthor Commented:
Adjusted points from 550 to 575
0
 
LischkeCommented:
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
 
arcrottyAuthor Commented:
Adjusted points from 575 to 600
0
 
arcrottyAuthor Commented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 13
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now