Page 2 of 6
Posted: Thu Mar 23, 2006 12:20 pm
by PB
> Any ideal uses for this though?
I've always wished the PureBasic editor could have embedded images,
because it'd make it easier to navigate a large source code. I could have
a nice "MAIN" logo before my main loop, etc. Instead of just text, text, text!
Posted: Sat Mar 25, 2006 12:37 am
by srod
Have updated the code (now listed in post 1) by adding 3 functions:
- CatchRTF()
- LoadRTF()
- SaveRTF()
Have also updated the examples (post 2) to illustrate these functions.
Regards.
Posted: Sat Mar 25, 2006 9:17 am
by Nico
How to hide the text below the image?
Posted: Sat Mar 25, 2006 11:05 am
by srod
What text?
Posted: Sat Mar 25, 2006 1:57 pm
by Nico
Here, a drag'n drop:

Posted: Sat Mar 25, 2006 2:13 pm
by srod
Bugger me, I didn't realise you could do that with an OLE enabled rich edit!
I'll have a rummage through the interface specs and see if I can find anything!
Posted: Sat Mar 25, 2006 3:20 pm
by srod
I can prevent the drop easily enough, but when dropping files in this way, the contents are not converted to rtf format, but are simply dumped into memory and linked accordingly. For example, drag a powerpoint presentation and you end up with a graphic saying "Microsoft Powerpoint..." etc. However, open up a powerpoint presentation, select all, copy and then paste into an OLE enabled editor gadget and you get a visual image which, when double clicked, calls up MS Powerpoint for in place editing etc. It's pretty neat, but doesn't really answer your question as I suspect that it is not easily possible.
My suspicion is that you will need to intercept the drop, open the file yourself and somehow stream the contents whilst converting to rtf format yourself!
I'll keep searching however.

Posted: Mon Mar 27, 2006 8:47 pm
by srod
Small update to the functions CatchRTF() and LoadRTF(), both of which offer an optional parameter to replace the current selection only or the entire contents of the editor gadget etc.
Posted: Tue May 02, 2006 3:27 am
by Fangbeast
is there any way to split the editorgadget into columns? A bit like a shopping list.
Posted: Tue May 02, 2006 10:53 am
by srod
I don't think so, at least not in the way that MS word does for example.
You might be able to fudge something with tabstops however.

Posted: Tue May 02, 2006 11:11 am
by Dare2
srod wrote:Bugger me, I didn't realise you could do that with an OLE enabled rich edit!

lol
I have got absolutely nowhere with aligning text and images. Any success with this? (If so, then that would probably make you one of a handful on the planet!)
Posted: Tue May 02, 2006 11:30 am
by srod
Dare2 wrote:I have got absolutely nowhere with aligning text and images. Any success with this? (If so, then that would probably make you one of a handful on the planet!)
I haven't had time to look yet. My current project (my first commercial whopper!) is approaching the point where I require the ole features of a rich edit (which was the motivation in my investigating embedding images etc.) and so it will not be long now.
However, I suspect my requirements are not as specific as yours. My alignment issues can be solved with a few strategically placed tabs and margin alignment etc.
btw, there's a small bug in the above code. I've fixed it, but will not upload anew until I've extended the code so that it can handle more than one editor gadget at a time. It's a small issue. The new version should not break existing code however.
Posted: Tue May 02, 2006 11:52 am
by Dare2
srod wrote:my first commercial whopper!
Heya! Success to you!

That sounds great!
Posted: Sun Jul 02, 2006 2:10 pm
by srod
Code updated and various problems fixed with reference counting.
Example 1 updated to include multiple editor gadgets.
Posted: Sun Jul 02, 2006 2:26 pm
by rsts
Thanks for the code.
Is it supposed to be repeated?
cheers