View previous topic :: View next topic |
Author |
Message |
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Mon Apr 14, 2003 8:09 am Post subject: vdsobj02 problems |
|
|
hi all,
i am having problems adding pictures to a richedit element
this is the code that i am using and nothing happens ie. nothing is displayed in the richedit element
Code: |
%%dummy = @filedlg()
if @ok()
object focus, richedit1
OBJECT FORMAT,RICHEDIT1,CLIPBOARD,INSERTIMAGE,%%dummy
end
|
also if i do a copy of a picture and a paste into a richedit element, the picture gets pasted ok but it is not the correct size...it is very very high
any help would be appreciated
thanks in advance
Swerge _________________
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Mon Apr 14, 2003 1:44 pm Post subject: |
|
|
You first need to select the position where you want the image to go:
OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,@len(@object(dlgtext,richedit1)),@len(@object(dlgtext,richedit1))
the above code just selects the last position in the RICHEDIT, you can then use a PASTE or INSERTIMAGE command.
Does the example 1 demo that comes with vdsobj not show the REGISTER NOW image in the richedit? If not then there might be a problem with it loading images. |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Mon Apr 14, 2003 11:04 pm Post subject: |
|
|
hi pg,
tried your line of code first and still no go
i looked at example 1 and it works fine so i'm not sure what i am doing wrong
i even tried importing the picture you use in example 1 and no go
this is the code i am using
Code: |
object class, test_creator
object add,style,style1,verdana,8,,background,foreground
OBJECT ADD,RICHEDIT,RICHEDIT1,50,5,600,488,,WRAP,SCROLL,TAB,STYLE1
.........
%%dummy = @filedlg()
if @ok()
OBJECT FORMAT,RICHEDIT1,CLIPBOARD,SELECT,@len(@object(dlgtext,richedit1)),@len(@object(dlgtext,richedit1))
OBJECT FORMAT,RICHEDIT1,CLIPBOARD,INSERTIMAGE,%%dummy
end |
thanks pg
Serge _________________
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Tue Apr 15, 2003 12:22 am Post subject: |
|
|
Hi Serge,
I found the problem, it looks like if I add a GRAPHIC object with the same number GRAPHIC1 and then a richedit with same number RICHEDIT1 then the richedit will allow you to add graphics. It's due to an internal variable that I used and didn't think about which held the actual file within it. I've fixed it and the new update for VDSOBJ is available to download. Please tell me if it works okay now. Btw in your above code you put 'TAB' it should be 'TABS'. |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 15, 2003 4:07 am Post subject: |
|
|
thanks a bunch pg...it works now and i'm wrapped!!!
you mentioned in an earlier post that you were going to add some new things to vdsobj and was wondering if you are still going to do that...no pressure...just curious
thanks heaps once again
Serge _________________
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Tue Apr 15, 2003 4:52 am Post subject: |
|
|
Well I might add in a few controls but mostly I will just fix bug. |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Apr 15, 2003 10:45 pm Post subject: |
|
|
cool
Serge _________________
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|