Panel Borders

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Panel Borders

Post by Jerry Thomas » Fri Aug 30, 2013 3:45 pm

I am building an app that will be resizing to fit the screen. I am using panels to easily adjust size and position of groups of controls.

My problem is that the panel borders make the form look choppy.
Is there a way to hide the border of the panels?

Code: Select all

Dialog>Dialog1
object Dialog1: TForm
  Left = 693
  Top = 343
  HelpContext = 5000
  BorderIcons = [biSystemMenu]
  Caption = 'CustomDialog'
  ClientHeight = 212
  ClientWidth = 476
  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 = 0
    Top = 0
    Width = 472
    Height = 40
    Caption = 'Panel1'
    TabOrder = 8
  end
  object Panel2: TPanel
    Left = 0
    Top = 40
    Width = 200
    Height = 40
    Caption = 'Panel2'
    TabOrder = 9
  end
  object Panel3: TPanel
    Left = 200
    Top = 40
    Width = 185
    Height = 40
    Caption = 'Panel3'
    TabOrder = 10
  end
end
EndDialog>Dialog1

GetScreenRes>ScrWidth,ScrHeight
Let>HalfScreenWidth={Trunc(%ScrWidth%/2)}

SDP>Dialog1,,Top,0
SDP>Dialog1,,Left,0
SDP>Dialog1,,ClientWidth,ScrWidth
SDP>Dialog1,,ClientHeight,ScrHeight

SDP>Dialog1,Panel1,Width,ScrWidth

SDP>Dialog1,Panel2,Width,HalfScreenWidth

SDP>Dialog1,Panel3,Left,HalfScreenWidth
SDP>Dialog1,Panel3,Width,HalfScreenWidth

Show>Dialog1,r
Thanks,
Jerry

[email protected]

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

Post by JRL » Fri Aug 30, 2013 4:36 pm

Hi Jerry,

Make sure The panel object's bevel properties are all set to none.

Jerry Thomas
Macro Veteran
Posts: 267
Joined: Mon Sep 27, 2010 8:57 pm
Location: Seattle, WA

Post by Jerry Thomas » Fri Aug 30, 2013 4:48 pm

That was it.
I was trying different BorderStyles and never tried changing Bevel.

Thanks JRL!
Thanks,
Jerry

[email protected]

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Sat Aug 31, 2013 12:04 am

Gotta love that JRL. He's a bit of a star. :)

I really love how members of this community help each other.

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