
-----------------------------------
Boiq
Thu Oct 30, 2008 7:15 am

Creating a list
-----------------------------------
Hey guys. I've been working on a list that I have to create. How it works is that I check a box of the list topic that I would like to preview, then it opens up the list in a new window. The list's would be saved for example in a notepad file and would contain say, a list of birthday's in order from youngest to oldest. So far I have the box's to check off. They light up when you click with the left mouse button, and go back blank when you right click them to unselect your option. Here is the code that I got working so far, all I need for it to do now is open up a certain list when you actually check the box, right now when you check the box it does not do anything. The codes open seperately in two different windows. The one program open's the other, making it work properly. Here is the first code named "list":

setscreen ("graphics:640;480")
buttonchoose ("multibutton")
var button, x, y, sale : int
var font : int
font := Font.New ("Bradley Hand ITC:10:bold")
Font.Draw ("Text", 30, 460, font, 49)
Font.Draw ("Text", 30, 440, font, 39)
Font.Draw ("Text", 30, 420, font, black)
Font.Draw ("Text", 30, 400, font, 58)
Font.Draw ("Text", 30, 380, font, cyan)
Font.Draw ("Text", 30, 360, font, 13)
include "List-Lib.t"
drawbox (10, 460, 20, 470, gray)
drawbox (10, 440, 20, 450, gray)
drawbox (10, 420, 20, 430, gray)
drawbox (10, 400, 20, 410, gray)
drawbox (10, 380, 20, 390, gray)
drawbox (10, 360, 20, 370, gray)
loop
mousewhere (y,x,button)
mouse
end loop
open : sale, "OnHand", put
var houseType :
    record
        color : string (10)
        location : string (20)
        price : int
    end record

And here is the second code to the next program named "list-ilb":

proc mouse
    if button = 1 then
        if x >= 10 and x = 460 and y = 10 and x = 460 and y = 10 and x = 440 and y = 10 and x = 440 and y = 10 and x = 420 and y = 10 and x = 420 and y = 10 and x = 400 and y = 10 and x = 400 and y = 10 and x = 380 and y = 10 and x = 380 and y = 10 and x = 360 and y = 10 and x = 360 and y 