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 


Indent and unindent text in a edit box...

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


Joined: 30 Jun 2001
Posts: 60

PostPosted: Sun Feb 03, 2002 4:32 pm    Post subject: Indent and unindent text in a edit box... Reply with quote

Hi,

I have problem with a little function Indent text and Unindent text..
when I paste the indented text I lost my highlight text.


Code:

:XPERT_INDENTBUTTON
rem highlight text properties
%%HL_lenght = @sendmsg(@win(~XPERT_QUERY),$0301,0,0)
rem cursor position
%A = @sendmsg(@winexists(~XPERT_QUERY),$0B0,0,0)
%%cursor_position = @succ(@diff(%A,@prod(@div(%A,65536),65536)))

if @not(@zero(%%HL_lenght))
 rem stock in a list highlighting text
 list create,1
 list paste,1
 
    rem add tab key
    %i = 0
    repeat
      %%cur_item = @item(1,%i)
     list put,1," "%%cur_item
      %i = @succ(%i)
    until @equal(%i,@count(1))
   
   rem clipbard and paste
   clipboard set,@text(1)
   %P = @sendmsg(@win(~XPERT_QUERY),$0302,0,0)
   %P = @sendmsg(@win(~XPERT_QUERY),$0B1,%%cursor_position,@len(@text(1)))
 
 list close,1
end
 
goto evloop


_________________
Thanks
Back to top
View user's profile Send private message Send e-mail 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