Share your advanced PureBasic knowledge/code with the community.
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Sun Jul 02, 2006 2:49 pm
rsts wrote: Thanks for the code.
Is it supposed to be repeated?
cheers
Uhm, absolutely...
Fixed!
I may look like a mule, but I'm not a complete ass.
Dare
Addict
Posts: 1965 Joined: Mon May 29, 2006 1:01 am
Location: Outback
Post
by Dare » Sun Jul 02, 2006 2:50 pm
Dare2 cut down to size
pfoo
New User
Posts: 7 Joined: Thu May 25, 2006 3:00 pm
Post
by pfoo » Sun Aug 13, 2006 7:52 pm
Hey, very good job
Is it possible to add text on the left or on the righ of the image ?
Apparently,
Code: Select all
SetGadgetText(0,a$+"test")
SetGadgetText(1,a$+"test")
don't work, but it's possible to write manualy beside images ...
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Sun Aug 13, 2006 10:42 pm
Depends on what you mean?
You can certainly add some text, then insert an image - all in code. Either by using the clipboard, inserting rtf directly or by streaming etc.
I may look like a mule, but I'm not a complete ass.
pfoo
New User
Posts: 7 Joined: Thu May 25, 2006 3:00 pm
Post
by pfoo » Sun Aug 13, 2006 11:47 pm
What i mean is putting text and image on the same line.
For example :
Blah blah blah (image) blah blah blah
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Mon Aug 14, 2006 8:57 am
Yes, although alignment is a problem where images are concerned. Anything you can do by typing directly into an editor gadget can be done in code.
Best bet is probably to use the clipboard, at least in the first instance.
See dare's post above for one way of using the clipboard.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Wed Aug 30, 2006 10:40 am
Bug fix: 30th August 2006.
Due to my very sketchy understanding of COM etc. Again involving the reference counting.
Code is in the first post.
I may look like a mule, but I'm not a complete ass.
PHP
User
Posts: 65 Joined: Sat Sep 10, 2005 5:38 pm
Post
by PHP » Fri Sep 15, 2006 5:37 pm
Hello,
what's the fastest way to include small bmp-pictures (32x32 pixel) into the EditorGadget()?
If possible without using the clipboard... just convert the bmp so i can use them in the Data-area...
PHP
User
Posts: 65 Joined: Sat Sep 10, 2005 5:38 pm
Post
by PHP » Fri Sep 15, 2006 6:27 pm
Okay i found a way to convert the .bmp to .rtf and included it into the source.
My problem: The image is not shown in the original size but 2x times bigger or something
Does anyone know how to fix that? It's nice to include pictures into the EditorGadget() but if they are not shown in original size it's bad...
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Fri Sep 15, 2006 6:32 pm
Save it in rtf format, e.g. copy into Wordpad and then save.
Then use CatchRtf() or LoadRtf() etc.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Fri Sep 15, 2006 6:36 pm
Are you converting to rtf using PB code or using another program?
I may look like a mule, but I'm not a complete ass.
PHP
User
Posts: 65 Joined: Sat Sep 10, 2005 5:38 pm
Post
by PHP » Tue Sep 19, 2006 11:40 pm
1) creating the picture in Paint Shop Pro
2) save in .wmf
3) paste into WordPad
4) save as .rtf
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Tue Sep 19, 2006 11:50 pm
I use a similar method except I create it in word (simple diagrams), copy into Wordpad and then save etc. I let wordpad handle the conversion to wmf etc.
I may look like a mule, but I'm not a complete ass.
PHP
User
Posts: 65 Joined: Sat Sep 10, 2005 5:38 pm
Post
by PHP » Tue Sep 19, 2006 11:54 pm
This works of course, but the image is not in the same size as in WordPad
Just try with a small (typical) 16x16 Smiley...
srod
PureBasic Expert
Posts: 10589 Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...
Post
by srod » Wed Sep 20, 2006 12:16 am
Works fine here php.
I just copied the smiley of yours into wordpad. Saved it and then loaded it into an editor gadget. Exactly the same size!
I may look like a mule, but I'm not a complete ass.