%CRLF% in Panel

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
nodochau
Pro Scripter
Posts: 131
Joined: Wed Jan 16, 2019 12:59 pm

%CRLF% in Panel

Post by nodochau » Thu Jul 30, 2020 7:21 pm

Hello,
I am creating a dialog with some Panels. When I setdialogproperty for panels, the %CRLF% does not work.
Do you have any idea?
Thanks s lot

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: %CRLF% in Panel

Post by Marcus Tettmar » Sun Aug 02, 2020 2:28 pm

Do you mean in the caption? Can you explain what you are trying to do and show us your code?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

nodochau
Pro Scripter
Posts: 131
Joined: Wed Jan 16, 2019 12:59 pm

Re: %CRLF% in Panel

Post by nodochau » Tue Aug 04, 2020 12:13 pm

Marcus Tettmar wrote:
Sun Aug 02, 2020 2:28 pm
Do you mean in the caption? Can you explain what you are trying to do and show us your code?
Hi Marcus,
Yes, it is in Caption. I want two separate lines show in the panel.

Code: Select all

Dialog>Dialog1
object Dialog1: TForm
  Left = 2413
  Top = 110
  HelpContext = 5000
  BorderIcons = [biSystemMenu]
  Caption = 'CustomDialog'
  ClientHeight = 205
  ClientWidth = 586
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -14
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = True
  ShowHint = True
  OnTaskBar = False
  PixelsPerInch = 120
  TextHeight = 16
  object Panel1: TPanel
    Left = 195
    Top = 65
    Width = 185
    Height = 41
    Caption = 'Panel1'
    TabOrder = 8
  end
end
EndDialog>Dialog1
SetDialogProperty>dialog1,Panel1,Caption,Value: Input %CRLF% Samples: 30
Show>dialog1,

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

Re: %CRLF% in Panel

Post by JRL » Tue Aug 04, 2020 6:26 pm

Panels don't accept a multiline caption. The solution I've used is to place a label in the panel.

Code: Select all

Dialog>Dialog1
object Dialog1: TForm
  Left = 613
  Top = 189
  HelpContext = 5000
  BorderIcons = [biSystemMenu]
  Caption = 'CustomDialog'
  ClientHeight = 140
  ClientWidth = 228
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = True
  ShowHint = True
  OnTaskBar = False
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 21
    Top = 18
    Width = 185
    Height = 87
    TabOrder = 0
    object Label1: TLabel
      Left = 72
      Top = 16
      Width = 32
      Height = 13
      Caption = 'One'#13#10'Two'#13#10'Three'
    end
  end
end
EndDialog>Dialog1

Show>dialog1,

nodochau
Pro Scripter
Posts: 131
Joined: Wed Jan 16, 2019 12:59 pm

Re: %CRLF% in Panel

Post by nodochau » Wed Aug 05, 2020 12:43 am

Thanks a lot JRL.

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