|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Anupriya
Joined: 27 Mar 2009 Posts: 11
|
Posted: Mon Jun 01, 2009 8:53 pm Post subject: close editable list box(%el) automatically |
|
|
hi,
i am making use of %^el[extended] so that i will be able to call the call back function every time i select a item from the editable list box.
the problem is once the item is selected it does the draw commands in call back function but the list box is open and i close it all the time with done button i created.
is there a way to close the list box automatically once the item is selected.i tried giving the call back function a -ve return value but it shows run time error.
any help is much appreciated. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Tue Jun 02, 2009 8:31 am Post subject: |
|
|
It always helps if you can give us a short program to work on. |
|
Back to top |
|
|
Anupriya
Joined: 27 Mar 2009 Posts: 11
|
Posted: Tue Jun 02, 2009 5:46 pm Post subject: |
|
|
here is the program,
PROGRAM
EXTERNAL CLOSEWIN, LSFUNCTION
..
..
CHARACTER A(2)*5
DATA(A(I),I=1,2)/'A','B'/
CHARACTER K
K="A"
I=WINIO@('%CA[......]&')
...
....
....
I= WINIO@('%2nl select:^7.3el[extended]&',angle,2L,k,lsfunction)
I=WINIO@('%2nl%^bt[DONE],CLOSEWIN)
END
INTEGER FUNCTION LSFUNCTION()
INTEGER ITEM
ITEM=CLEARWIN_INFO@['EDITABLE_LISTBOX_INDEX']
IF (ITEM.EQ.1) THEN
..
..(DRAW THIS)
END IF
IF (ITEM.EQ.2) THEN
..
..(DRAW THIS)
END IF
LSFUNCTION=1
END
THE PROGRAM WORKS FINE,BUT EVERY TIME WHEN I SELECT THE ITEM IT DOES THE DRAWING BUT I CLOSE THE BOX WITH THE DONE BUTTON.
I WAS WONDERING IF THERE IS A WAY TO CLOSE THE LIST BOX AUTOMATICALLY ONCE THE ITEM IS SELECTED. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Tue Jun 02, 2009 7:26 pm Post subject: |
|
|
This works OK...
Code: | PROGRAM test
EXTERNAL lsfunction
CHARACTER*5 a(2),k
DATA(a(I),I=1,2)/'A','B'/
integer lsfunction,winio@,closewin
I=WINIO@('%ca[......]&')
I=WINIO@('%2nl select:%^7.3el[extended]&',a,3,k,lsfunction)
I=WINIO@('%2nl%^bt[DONE]','EXIT')
END
INTEGER FUNCTION lsfunction()
INTEGER item
INCLUDE <windows.ins>
item=clearwin_info@('EDITABLE_LISTBOX_INDEX')
IF (item.EQ.1) THEN
PRINT*, "1"
END IF
IF (item.EQ.2) THEN
print*, "2"
END IF
lsfunction=0
END
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|