Results 1 to 6 of 6

Thread: Form help please!

  1. #1
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Form help please!

    SCAR Code:
    BitBtn1.OnClick := (I want it to close the form, and load the next procedure, aka start the real script);

    What goes after onclick := ??

    The form looks like this (ATM):


  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Have a procedure which does everything which is need to run Tutorial Island, then do for the form procedures, then do:

    SCAR Code:
    BitBtn1.OnClick:= @Everything; //Everything is the name of the procedure which does everything

    Richard.
    Last edited by Rich; 10-10-2009 at 09:28 PM.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    To do this you should have a procedure called ButtonClicked(Sender : TObject);
    and then you would do
    BitBtn1.OnClick := @ButtonClicked;and the procedure would look something like this:
    SCAR Code:
    procedure ButtonClicked(Sender :TObject);
    begin
      case Sender of
        BitBtn1: FORMNAME.ModalResult := mrOk;
      end;
    end;
    Keep in mind that I did not use SCAR to make that procedure so it might not work as you would want it to...

  4. #4
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by R1ch View Post
    Have a procedure which does everything which is need to run Tutorial Island, then do for the form procedures, then do:

    SCAR Code:
    BitBtn1.OnClick:= Everything; //Everything is the name of the procedure which does everything

    Richard.
    Doing this I get a mismatch error (lol). I'll try Zyt3x's version

    @Zyt3x, I don't really understand your post. Changing my BitBtn1.OnClick := @ButtonClicked; seems to do nothing, even after creating that procedure.
    Last edited by uncfan1119; 10-10-2009 at 09:36 PM.

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    In your .OnClick you will need to save all of your player info also.

  6. #6
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    @zyt3x, oh now I understand, that is to close it. Thanks for your help.

    @mormonman, oh wow I almost forgot! That is easy though.

    I've solved the problem, I was using the wrong button!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •