forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


EDIT object, only 3 styles?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Wed Jun 11, 2003 10:55 pm    Post subject: EDIT object, only 3 styles? Reply with quote

Isn't it possible to add more than 3 styles for a note object?
Code:
DIALOG ADD,EDIT,NOTE,80,8,192,160,,,MULTI,SCROLL,WRAP


And one more thing, how can I make an event when the text inside the edit object is changed?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2150
Location: A House

PostPosted: Thu Jun 12, 2003 12:17 am    Post subject: Reply with quote

Yes, it's possible to have more styles, but the dialog designer is limited
to so many fields. You have to add more styles in the editor itself.

For catching changes to an edit box, I'd use a :TIMER loop. When you
first load the program, "%A = @dlgtext(EDIT1)". In the timer loop
you just compare %A with the current contents like this

"IF @not(@equal(%A,@dlgtext(EDIT1)))"

If it's not equal, then something has changed and you can take appropriate
actions.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Thu Jun 12, 2003 12:20 am    Post subject: Reply with quote

Aaa great idea.
Thanks for that Garrett Smile

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2150
Location: A House

PostPosted: Thu Jun 12, 2003 12:23 am    Post subject: Reply with quote

Oh, one more thing... If the contents do change, then you need to fill
%A with the new contents again if you want to continue to monitor
further changes to the contents of that edit box.

Code:
If @not(@equal(%A,@dlgtext(EDIT1)))
  REM -- do what you need to do here
  %A = @dlgtext(EDIT1)
End


-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Jun 12, 2003 3:38 pm    Post subject: Reply with quote

geotrail,

there is an api that you can use from withing vds to detect whether an edit box has been modified or not...i use it often and it is very handy...can't tell you which one at the moment as i'm not running vds on my new computer...if you are stuck in that you can't find it, let me know and i will look up the code for you once i have vds reinstalled on my machine

the api "book" is available from vdsworld and has lots of very useful api's one can use in vds

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2150
Location: A House

PostPosted: Thu Jun 12, 2003 7:03 pm    Post subject: Reply with quote

But can an event be generated using this api? Or do you have to check
in a timer loop like I do with the @dlgtext() above?

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Thu Jun 12, 2003 10:19 pm    Post subject: Reply with quote

Yeah that would be very usefull Serge Smile

Thanks

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Jun 12, 2003 10:41 pm    Post subject: Reply with quote

garrett,

you need to use a timer label to check regularly but the advantage with that is that any modification made is picked up just as in any windows word processor

geotrail,

the api is,

Code:

%%dummy = @sendmsg(@win(~edit1),$0B8,0,0)
if @equal(%%dummy,1)
   rem edit has been modified
elsif @equal(%%dummy,0)
   rem edit has not been modified
end


you will also need the following api to manually set the "modified" or "not modified" flag
Code:

rem next line sets edit1 to "has not been modified"
%%dummy = @sendmsg(@win(~edit1),$0B9,0,0)
rem next line sets edit1 to "has been modified"
%%dummy = @sendmsg(@win(~edit1),$0B9,1,0)


check out the other api's available for edit boxes, there are some very useful ones including get line count of edit box, get number of characters in edit box, make edit box read only, and more...

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2150
Location: A House

PostPosted: Thu Jun 12, 2003 10:56 pm    Post subject: Reply with quote

Well, either way then. They both do the same thing, so GeoTrail, pick
which one you like Smile

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Thu Jun 12, 2003 11:13 pm    Post subject: Reply with quote

Thanks Serge.
I've never used @sendmsg() before Laughing
Is there a way to get the url entered in the address bar of IE?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Jun 12, 2003 11:30 pm    Post subject: Reply with quote

no problems geotrail...do look into these api's, they really extend the functionality of vds and not just with edit boxes but with lists too, combo boxes and windows in general

to answer your question, yes there is but it is very complicated...this is what i have found anyway...can't help more now because vds is not on my pc...nor are my code files...+ i am writing school reports at the moment...will get back to you on that one later on if you are still interested

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Fri Jun 13, 2003 12:00 am    Post subject: Reply with quote

OK, thanks Serge.

Any A+'s in there? Laughing

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Jun 13, 2003 4:09 am    Post subject: Reply with quote

he he he...yes there are a few A+'s in there...some students are really really smart Very Happy

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jun 13, 2003 8:40 pm    Post subject: Reply with quote

GeoTrail wrote:
Thanks Serge.
I've never used @sendmsg() before Laughing
Is there a way to get the url entered in the address bar of IE?


I think I saw an example using DDE somewhere here. Let me check for ya. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jun 13, 2003 10:07 pm    Post subject: Reply with quote

Here's the DDE example that may help Wink :

http://forum.vdsworld.com/viewtopic.php?t=1222

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group