Sample Dialog with Tabs

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Sample Dialog with Tabs

Post by JRL » Tue Jun 14, 2011 3:31 pm

There are other examples of dialogs with tabs on the forum. Most of them that I found have other settings that might confuse new users. This is a very basic example of a dialog with four tabs each having one text object. Other objects can be added using the Dialog Editor.

More tabs can be added or existing tabs can be deleted using the Dialog Editor by right clicking on the tabs object and selecting the appropriate action from the popup menu.

This script requires Macro Scheduler version 12 or greater.

Code: Select all

Dialog>Dialog1
object Dialog1: TForm
  BorderIcons = [biSystemMenu]
  Caption = 'Tabs Sample'
  ClientHeight = 300
  ClientWidth = 500
  object msTabBook1: TPageControl
    Left = 0
    Top = 0
    Width = 500
    Height = 300
    TabOrder = 0
    object TTabSheet
      Caption = 'Tab 1'
      object Label1: TLabel
        Left = 46
        Top = 88
        Width = 32
        Height = 13
        Caption = 'Tab 1'
      end
    end
    object TTabSheet
      Caption = 'Tab 2'
      object Label2: TLabel
        Left = 112
        Top = 104
        Width = 32
        Height = 13
        Caption = 'Tab 2'
      end
    end
    object TTabSheet
      Caption = 'Tab 3'
      object Label3: TLabel
        Left = 216
        Top = 72
        Width = 32
        Height = 13
        Caption = 'Tab 3'
      end
    end
    object TTabSheet
      Caption = 'Tab 4'
      object Label4: TLabel
        Left = 96
        Top = 120
        Width = 32
        Height = 13
        Caption = 'Tab 4'
      end
    end
  end
end
EndDialog>Dialog1

show>dialog1,res1

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts