Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   2000 (http://www.chiefdelphi.com/forums/forumdisplay.php?f=39)
-   -   Canvas in Delphi - Simple question (http://www.chiefdelphi.com/forums/showthread.php?t=11566)

archiver 24-06-2002 00:30

Canvas in Delphi - Simple question
 
Posted by Hannah.

Other from Uni of Herts.

Posted on 11/23/2000 8:04 AM MST



Im just sorting some work out and need a bit fo help

I need to design a form with drop down buttons ie File, Edit, Owner etc

When you click on the owner button i need to display some text on the screen

Ive tried using delphi help but im having no luck

Any info would be most useful!

Cheers
Hannah



archiver 24-06-2002 00:30

Re: Canvas in Delphi - Simple question
 
Posted by Ian.

Student on team #188 from Woburn C.I..

Posted on 11/29/2000 3:24 PM MST


In Reply to: Canvas in Delphi - Simple question posted by Hannah on 11/23/2000 8:04 AM MST:



Probably the easiest way to show some text on the screen is with the ShowMessage procedure, e.g.:

ShowMessage('Sample message');

A little box will pop up with the text you put as the parameter and an 'OK' button to close the box. If you want something more sophisticated, you could create a new form with text, graphics, etc. Before running the program, set the 'Visible' property of the second form to false. Then, when you want to show it, simply call the Show procedure, e.g.

Form2.Show;

Then, you can use Form2.Hide to hide it again (for instance, you could make the second form call its own Hide procedure when it is clicked). If you want to access labels or other components of the second form from within your main program, simply put the name of the second form in front of the name of the component, e.g.

Form2.Label1.Caption:='This is a label';
Form2.Button1.Enabled:=False;

Hope this helps!

-Ian Mackenzie
Team 188
www.team188.com




All times are GMT -5. The time now is 22:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi