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 


Is it possible to dynamically expand an edit box using API?

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


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Tue Sep 21, 2010 3:55 pm    Post subject: Is it possible to dynamically expand an edit box using API? Reply with quote

I would like to be able to dynamically enlarge a EDIT control when it has FOCUS, and then reduce it back down to its original size again, when FOCUS is lost.

Is this possible to do using API?

Thanks in advance

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Tue Sep 21, 2010 11:18 pm    Post subject: Reply with quote

You don't need API for this

Code:
Title ExpandElementOnFocus
  DIALOG CREATE,ExpandElementOnFocus,-1,0,373,160
  DIALOG ADD,BUTTON,UnFocus,31,289,64,24
  DIALOG ADD,EDIT,EDIT1,31,19,180,19,EDIT1,,EXIT,CLICK,MULTI,WRAP
  DIALOG ADD,BUTTON,Close,118,289,64,24,Close
  DIALOG SHOW
 
:Evloop
  wait event
  goto @event()
 
:UnFocusBUTTON
  info EDIT1 should now return to normal size@cr()because it has lost focus
  goto evloop
 
:EDIT1CLICK
  DIALOG SETPOS,EDIT1,31,19,240,111
  goto evloop
 
:EDIT1EXIT
  DIALOG SETPOS,EDIT1,31,19,180,19
  goto evloop
 
:CloseBUTTON
:Close
  exit
Back to top
View user's profile Send private message Send e-mail
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Wed Sep 22, 2010 6:09 am    Post subject: Reply with quote

Hi, many thanks for that. Had a brain bypass this week. As a subsidiary question is there a way to pop up a GROUP dialog when a TEXT element is hovered over? And then hide the GROUP dialog when the mouse moves away?

Regards

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Wed Sep 22, 2010 5:14 pm    Post subject: Reply with quote

Hi arcay:

This way, for example:

Code:
  DIALOG CREATE,Test MOUSEOVER,-1,0,240,225
  DIALOG ADD,TEXT,TEXT1,60,30,75,18,I Love MOUSE
  DIALOG ADD,BITMAP,BITMAP1,60,30,75,18,,,MOUSEOVER
  DIALOG SHOW
 
:Loop
  wait event
  %e = @event()
 
  goto %e
 
:Close
  info Bye!
  stop
 
:BITMAP1ENTER
  parse "%x;%y",@mousepos(XY)
 
  DIALOG CREATE,Love message,@sum(%y,10),@sum(%x,20),108,50,NOSYS,COLOR FF5E5E
  DIALOG ADD,TEXT,TEXT1,17,17,,,Mouse is over
  DIALOG SHOW
 
  wait event
  dialog close
 
  while @event()
  wend
  goto Loop


A TEXT element doesn't allow an "ENTER" event. We need a BITMAP element to generate this event.

Good luck Very Happy

_____________

uVeDeSe
_____________
Back to top
View user's profile Send private message Visit poster's website
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Wed Sep 22, 2010 5:30 pm    Post subject: Reply with quote

Many Thanks, uvedese!

Just what I wanted!

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

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