Community

SCI Programming => Mega Tokyo SCI Archive => Topic started by: Chris Cromer on April 21, 2002, 11:08:47 AM

Title: Windows and Text resources.
Post by: Chris Cromer on April 21, 2002, 11:08:47 AM
Ok the question I have is, I have a window set up and it works just fine with the Display statement. The thing is though I would rather use a text resource to display the text that should be in the window. This would make it a little easier to make windows if it used the text resources instead of the Display command. I don't seem to know how to make it use the text from the text resource which has been bugging me.
Title: Re:Windows and Text resources.
Post by: Chris Cromer on April 21, 2002, 03:10:23 PM
Well I have figured out how to access the text resources and then print them in the message box. The only thing is I don't know how to dispose of the window once I am done with it, it just stays on the screen and won't go away. I have tried WindowDispose but I can't seem to get it to work.
Title: Re:Windows and Text resources.
Post by: Brian Provinciano on April 22, 2002, 11:09:45 PM
I've made a little demo for you of an About Box. To test it, download it:
http://www.bripro.com/scistudio/files/wndtest.zip

I updated the Event class with a getEvent().
I updated the Control class.
I created an Icon control from the Control class.
I create the Window, draw the Icon/text
I wait for an event.
I destroy the window.

The end  ;D

(ps. Get SCI Studio 2.0.4.109 04/23/2002)
Title: Re:Windows and Text resources.
Post by: robingravel on April 23, 2002, 07:28:30 AM
File not found error 404

Robin Gravel
Title: Re:Windows and Text resources.
Post by: Brian Provinciano on April 23, 2002, 09:34:02 AM
Whoops. It's actually at:
http://www.bripro.com/scistudio/files/wnddemo.zip
Title: Re:Windows and Text resources.
Post by: Chris Cromer on April 23, 2002, 02:36:08 PM
Thanks this should hopefully help me out with the windows. :)
Title: Re:Windows and Text resources.
Post by: Chris Cromer on April 25, 2002, 03:31:36 PM
Am I correct in thinking that the controls can be used to either display a view in the message window and to display text buttons in the window?
Title: Re:Windows and Text resources.
Post by: Brian Provinciano on April 25, 2002, 09:36:29 PM
The control classes have a "type" property. If the type is 1, it's a button (text with a border), if it's 4, it's an icon (a view), 6 is a list box, and so on. Check out the FreeSCI docs for more info, there's a whole page on it.
Title: Re:Windows and Text resources.
Post by: Chris Cromer on April 25, 2002, 11:55:37 PM
Ok, thanks. I will check out the FreeSCI page to learn more about this stuff.