| View previous topic :: View next topic |
| Author |
Message |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Tue Sep 21, 2010 3:55 pm Post subject: Is it possible to dynamically expand an edit box using API? |
|
|
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 |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Tue Sep 21, 2010 11:18 pm Post subject: |
|
|
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 |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Wed Sep 22, 2010 6:09 am Post subject: |
|
|
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 |
|
 |
uvedese Contributor


Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Wed Sep 22, 2010 5:14 pm Post subject: |
|
|
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
_____________
uVeDeSe
_____________ |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Wed Sep 22, 2010 5:30 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|
|