Results 1 to 10 of 10

Thread: Tabbed Form Question

  1. #1
    Join Date
    Dec 2006
    Location
    In the SaMe WoRld as yOu
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Tabbed Form Question

    Hey,

    Firstly i like to tell you im new to scripting so please bare with my "noob" question...

    I have included the script... im trying to add more buttons to that 2nd sheet, but im getting error... Please could you kindly help me...

    Advance Thanks

    Also if you could give me your msn it will be very helpfull...
    My msn: aje-2006@hotmail.com

    SCAR Code:
    program TabsTest;
    var
      frmDesign: TForm;
      Button1: TButton;
      PageControl: TPageControl;
      Page1, Page2: TTabSheet;

    procedure button1click(sender: TObject);
    begin
      WriteLn(Yes - Working);
    end;


    procedure InitForm;
    begin
      frmDesign := CreateForm;
      frmDesign.Left := 259;
      frmDesign.Top := 132;
      frmDesign.Width := 500;
      frmDesign.Height := 350;
      frmDesign.Caption := 'Aje'#39's Xtreme Teleporter  [Form]';
      frmDesign.Color := clBtnFace;
      frmDesign.Font.Color := clWindowText;
      frmDesign.Font.Height := -11;
      frmDesign.Font.Name := 'MS Sans Serif';
      frmDesign.Font.Style := [];
      frmDesign.Visible := False;
      frmDesign.PixelsPerInch := 96;
      frmDesign.Position := poScreenCenter;
      Button1,Button2 := TButton.Create(frmDesign);
      Button1.OnClick:= @buttonclick;
      Button1.Left := 69;
      Button1.Top := 61;
      Button1.Width := 75;
      Button1.Height := 25;
      Button1.Caption := 'Testing...';
      Button1.TabOrder := 8;

      Button2 := TButton.Create(frmDesign);
      Button2.OnClick:= @buttonclick;
      Button2.Left := 69;
      Button2.Top := 61;
      Button2.Width := 75;
      Button2.Height := 25;
      Button2.Caption := 'Cancel...';
      Button2.ModalResult = 2
      Button2.TabOrder := 8;


      PageControl := TPageControl.Create(frmDesign);
      PageControl.Parent := frmDesign;
      PageControl.Align := alClient;
      Page1 := TTabSheet.Create(frmDesign);
      TabSheetCaption(Page1, 'Login Details');
      Page1.PageControl := PageControl;
      Page2 := TTabSheet.Create(frmDesign);
      TabSheetCaption(Page2, 'Settings');
      Page2.PageControl := PageControl;
      Button1.Parent := Page2;
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    function ShowFormModal: Boolean;
    begin
      Result := False;
      if(frmDesign.ShowModal = mrOk)then Result := True;
    end;

    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;

    begin
      SafeInitForm;
      SafeShowFormModal;
      FreeForm(frmDesign);
    end.

    http://stats.srl-forums.com/be/SRL-S...erbars/305.png
    | Buying All Rune Ess - 30Ea | & | Buying P Ess As well |

    http://www.fenjer.com/adnan/SRLStats/305.png
    If I see you autoing with level 3 - Default clothes - Crap name I WILL report you.
    [ Auto Correctly: Put this in your signature, if you agree ]

    http://starblaster.freehostia.com/stress/Aje10.png

  2. #2
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Attach script or use Scar tags please

  3. #3
    Join Date
    Dec 2006
    Location
    In the SaMe WoRld as yOu
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by stupedspam View Post
    Attach script or use Scar tags please
    Yh, missed it

    http://stats.srl-forums.com/be/SRL-S...erbars/305.png
    | Buying All Rune Ess - 30Ea | & | Buying P Ess As well |

    http://www.fenjer.com/adnan/SRLStats/305.png
    If I see you autoing with level 3 - Default clothes - Crap name I WILL report you.
    [ Auto Correctly: Put this in your signature, if you agree ]

    http://starblaster.freehostia.com/stress/Aje10.png

  4. #4
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Well, you forgot to tell SCAR that Button2 was a Tbutton.

    SCAR Code:
    Button2: Tbutton;

    is what I think you need.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  5. #5
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    PHP Code:
    program TabsTest;
    var
      
    frmDesignTForm;
      
    Button1Button2TButton;
      
    PageControlTPageControl;
      
    Page1Page2TTabSheet;

    procedure button1click(senderTObject);
    begin
      WriteLn
    ('Yes - Working');
    end;


    procedure InitForm;
    begin
      frmDesign 
    := CreateForm;
      
    frmDesign.Left := 259;
      
    frmDesign.Top := 132;
      
    frmDesign.Width := 500;
      
    frmDesign.Height := 350;
      
    frmDesign.Caption := 'Aje'#39's Xtreme Teleporter  [Form]';
      
    frmDesign.Color := clBtnFace;
      
    frmDesign.Font.Color := clWindowText;
      
    frmDesign.Font.Height := -11;
      
    frmDesign.Font.Name := 'MS Sans Serif';
      
    frmDesign.Font.Style := [];
      
    frmDesign.Visible := False;
      
    frmDesign.PixelsPerInch := 96;
      
    frmDesign.Position := poScreenCenter;
      
    Button1 := TButton.Create(frmDesign);
      
    Button1.OnClick:= @button1click;
      
    Button1.Left := 69;
      
    Button1.Top := 61;
      
    Button1.Width := 75;
      
    Button1.Height := 25;
      
    Button1.Caption := 'Testing...';
      
    Button1.TabOrder := 8;

      
    Button2 := TButton.Create(frmDesign);
      
    Button2.Left := 69;
      
    Button2.Top := 61;
      
    Button2.Width := 75;
      
    Button2.Height := 25;
      
    Button2.Caption := 'Cancel...';
      
    Button2.TabOrder := 8;


      
    PageControl := TPageControl.Create(frmDesign);
      
    PageControl.Parent := frmDesign;
      
    PageControl.Align := alClient;
      
    Page1 := TTabSheet.Create(frmDesign);
      
    TabSheetCaption(Page1'Login Details');
      
    Page1.PageControl := PageControl;
      
    Page2 := TTabSheet.Create(frmDesign);
      
    TabSheetCaption(Page2'Settings');
      
    Page2.PageControl := PageControl;
      
    Button1.Parent := Page2;
    end;

    procedure SafeInitForm;
    var
      
    vTVariantArray;
    begin
      setarraylength
    (V0);
      
    ThreadSafeCall('InitForm'v);
    end;

    function 
    ShowFormModalBoolean;
    begin
      Result 
    := False;
      if(
    frmDesign.ShowModal mrOk)then Result := True;
    end;

    procedure SafeShowFormModal;
    var
      
    vTVariantArray;
    begin
      setarraylength
    (V0);
      
    ThreadSafeCall('ShowFormModal'v);
    end;

    begin
      SafeInitForm
    ;
      
    SafeShowFormModal;
      
    FreeForm(frmDesign);
    end
    There were a lot of errors. Check over and make sure you understand
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  6. #6
    Join Date
    Dec 2006
    Location
    In the SaMe WoRld as yOu
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Alot this really helped,

    Also, The buttons have to mentioned at the bottom to specific pages...

    SCAR Code:
    PageControl := TPageControl.Create(frmDesign);
      PageControl.Parent := frmDesign;
      PageControl.Align := alClient;
      Page1 := TTabSheet.Create(frmDesign);
      TabSheetCaption(Page1, 'Login Details');
      Page1.PageControl := PageControl;
      Page2 := TTabSheet.Create(frmDesign);
      TabSheetCaption(Page2, 'Settings');
      Page2.PageControl := PageControl;
      Button1.Parent := Page2;
      Button2.Parent := Page2;

    Am i correct?

    http://stats.srl-forums.com/be/SRL-S...erbars/305.png
    | Buying All Rune Ess - 30Ea | & | Buying P Ess As well |

    http://www.fenjer.com/adnan/SRLStats/305.png
    If I see you autoing with level 3 - Default clothes - Crap name I WILL report you.
    [ Auto Correctly: Put this in your signature, if you agree ]

    http://starblaster.freehostia.com/stress/Aje10.png

  7. #7
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    No, they can be mentioned anywhere in the InitForm Procedure as soon as you define the button and the PageControl
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  8. #8
    Join Date
    Feb 2007
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    aje, hit me up on msn if you need help.

    and btw, go get your own ideas, gosh dont need to make a teleporting script just coz I am.
    Any way, if you need a hand let me know.

    BTW i really do suggest you read over some of the tutorials for beginners as they do really help. Also spend time over them and try understand the syntax.
    You seem to be making small silly errors such as '' around strings.

  9. #9
    Join Date
    Dec 2006
    Location
    In the SaMe WoRld as yOu
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by stylen View Post
    aje, hit me up on msn if you need help.

    and btw, go get your own ideas, gosh dont need to make a teleporting script just coz I am.
    Any way, if you need a hand let me know.

    BTW i really do suggest you read over some of the tutorials for beginners as they do really help. Also spend time over them and try understand the syntax.
    You seem to be making small silly errors such as '' around strings.
    I have learned mate, im making mine much different to urs mate...

    http://stats.srl-forums.com/be/SRL-S...erbars/305.png
    | Buying All Rune Ess - 30Ea | & | Buying P Ess As well |

    http://www.fenjer.com/adnan/SRLStats/305.png
    If I see you autoing with level 3 - Default clothes - Crap name I WILL report you.
    [ Auto Correctly: Put this in your signature, if you agree ]

    http://starblaster.freehostia.com/stress/Aje10.png

  10. #10
    Join Date
    Feb 2007
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    KK all the best

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. savesetting form question
    By gerauchert in forum OSR Help
    Replies: 7
    Last Post: 07-11-2007, 05:54 PM
  2. Tabbed SCAR
    By I Karma I in forum News and General
    Replies: 4
    Last Post: 04-29-2007, 10:32 PM
  3. Nub form question
    By $PYD3R in forum OSR Help
    Replies: 0
    Last Post: 04-01-2007, 04:50 AM

Posting Permissions

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