Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RadioGroups and RichEdits 1

Status
Not open for further replies.

DJDemonian

Technical User
Nov 6, 2013
4
Hi guys, I'm back with more questions and hoped you could help me out. This is what I want to do : If you click on an Item from a RadioGroup, a .rtf file displays in a RichEdit. Could you help me out with the code please...
 
Well you wont learn anything if we write your code, but here are the steps you need to take..
Use the radio groups onclick method, then determine which item was clicked from the index of the group (someting like, if radiogroup.itemidex = Required selection then call handler procedure),
Write a procedure to handle this which says something like this..
Richedit.loadfromfile(filenameof your rtf).


Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
That's just perfectly normal Paranoia everyone in the universe has that: Slartibartfast
 
I tried that, seems all good but it doesn't seem to find the file specified?
 
Did you give it a full path? e.g C:\wheremyfileis\filename. If it is in the same folder as your executable. You can do things like

Filename := ExtractfilePath(application.exename)+ 'thenameofthefile'; to create the path
where Filename is a TFileName or a string.


Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
That's just perfectly normal Paranoia everyone in the universe has that: Slartibartfast
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top