
-----------------------------------
the_short1
Thu Sep 02, 2004 4:01 pm

Confirm Window.tu
-----------------------------------
this is mainly usefull to newer programmers... but its also good  for lazy pros too...

ok.... isntead of simply asking a user to say yes or no to a questionl (like text based)... or having to write of GUI code again and a again for all the programs u do.


SOLUtION!

while making my Just To Remind Me! program... i wanted to ask the user if they were shure they wanted to clear the database.... .  (in a pop up winow)and i wanted to hopefully use it for other programs... so i made it into a unit..


all the code needed to use and call the command are included in the unit file at the top (but commented '%')... simply put that code into ur program to utilize it.. (its like 4 lines)


its very simple.. very basic... but very handy...

making it a unit was the hardest part... (so u can get the results to pass to ur program.... )

basically... u call it like ConfirmWindow.tu.Create (variable) < whereas variable is a boolean variable u created in ur program to store the result of  question...(yes or no)


here is a SS

http://www.members.shaw.ca/rfolz/confirm.gif


DOWNLOAD: http://www.members.shaw.ca/rfolz/ConfirmWindow.tu

^ cant upload to compsci cuz its .tu...


post any comments.. questions on how i did it... suggestions ... or w/e...


and enjoy.. feel free to modify. and use it will any programs u wish... bu just keep the credits at the top of the file...

-----------------------------------
Tony
Thu Sep 02, 2004 4:12 pm


-----------------------------------
nice, though a skinable window would be better :wink: 

btw - I think I fixed the .tu upload issue, try now

-----------------------------------
the_short1
Thu Sep 02, 2004 6:30 pm


-----------------------------------
meh.. ill try next tiem i make a turing unit,.,, i tend to make a lot of them now that delos taught me..



 btw .. ty...


yea u can customize it all u want...  GUI.SetColor can be changed to ur liking... background color can be changed.. and so can the are u sure text color...   meh.. i was goig nfor really simple.. so new progreamers could find this usefull... specially since schools gona start.. they will be floading in here finding stuff..

-----------------------------------
beard0
Thu Sep 09, 2004 12:09 pm


-----------------------------------
You shouldn't hide the window at the end, but actually close it.  Otherwise, it uses memory (You can reopen it with everything as it was when you closed it by calling Window.Show when you hide it)

-----------------------------------
the_short1
Thu Sep 09, 2004 3:52 pm


-----------------------------------
cant close it... their was a bug (at least when i had it in my Just To Remind Me! program... ) when i closed it... it had some window error and crap... so me n delta or delos .. forget now.. just decided to hide it... 