Rem list_box object in function format. May be usefull in some app's.
Rem
Program slightly modified, see next posting
List_box object
-
- Posts: 816
- Joined: Tue Apr 09, 2013 12:23 pm
- My devices: iPhone,iPad
Windows - Location: Groningen, Netherlands
- Flag:
List_box object
Last edited by Henko on Sun Apr 14, 2013 6:35 pm, edited 1 time in total.
- Mr. Kibernetik
- Site Admin
- Posts: 4787
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: List_box object
Very interesting code!
I have several comments:
1. You can safely write
IF BUTTON_PRESSED("ok") THEN
instead of
IF BUTTON_PRESSED("ok")=1 THEN
2. You can use GRAPHICS CLEAR x,x,x to clear screen instead of FILL RECT 0,0 TO ...
Currently if you select city twice it becomes black color again.
I have several comments:
1. You can safely write
IF BUTTON_PRESSED("ok") THEN
instead of
IF BUTTON_PRESSED("ok")=1 THEN
2. You can use GRAPHICS CLEAR x,x,x to clear screen instead of FILL RECT 0,0 TO ...
Currently if you select city twice it becomes black color again.
-
- Posts: 816
- Joined: Tue Apr 09, 2013 12:23 pm
- My devices: iPhone,iPad
Windows - Location: Groningen, Netherlands
- Flag:
Re: List_box object
Indeed. The idea is that a selected item can be deselected again; but internally the item remained selected. I have changed that in the modified version.Mr. Kibernetik wrote:Very interesting code!
I have several comments:
1. You can safely write
IF BUTTON_PRESSED("ok") THEN
instead of
IF BUTTON_PRESSED("ok")=1 THEN
Yep, thanks
2. You can use GRAPHICS CLEAR x,x,x to clear screen instead of FILL RECT 0,0 TO ...
Thanks again, must read manual now and then![]()
Currently if you select city twice it becomes black color again.
Another change is that the width of the list_box (last item in the parameter list) will be calculated by the function if that parameter is given the value zero.