Images in Editor gadgets!
> 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!
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!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
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.
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.

I may look like a mule, but I'm not a complete ass.
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.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!)
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.
I may look like a mule, but I'm not a complete ass.