Recent

Author Topic: How to set Panel.BevelWidth to 0?  (Read 6153 times)

anna

  • Sr. Member
  • ****
  • Posts: 426
How to set Panel.BevelWidth to 0?
« on: May 10, 2010, 12:30:29 am »
Screensots:
http://img179.imageshack.us/img179/2559/87164390.png
http://img179.imageshack.us/img179/1975/88474441.png

LFM-file:
Code: [Select]
object Form1: TForm1
  Left = 290
  Height = 240
  Top = 175
  Width = 320
  Caption = 'Form1'
  ClientHeight = 240
  ClientWidth = 320
  LCLVersion = '0.9.29'
  object Panel1: TPanel
    Left = 109
    Height = 50
    Top = 75
    Width = 170
    BevelOuter = bvNone
    BorderStyle = bsSingle
    Caption = 'Panel1'
    TabOrder = 0
  end
end

Can you see white rectangle inside darkgray rectangle? Is it failure?

In ExtCtrl.pp file I changed
  
Code: [Select]
TBevelWidth = 1..Maxint;  
on
Code: [Select]
TBevelWidth = 0..Maxint; then I compiled , but again see white rectangle.
« Last Edit: May 10, 2010, 12:32:00 am by anna »
WinXP SP3 Pro Russian 32-bit (5.1.2600)

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: How to set Panel.BevelWidth to 0?
« Reply #1 on: May 10, 2010, 02:33:37 am »
You see the border - not a bevel.

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: How to set Panel.BevelWidth to 0?
« Reply #2 on: May 10, 2010, 04:09:59 am »
You see the border - not a bevel.
Hm-m-m...
Yep...
But I need to hide white line. I need 1px-darkgray rectangle.
 Help me.
WinXP SP3 Pro Russian 32-bit (5.1.2600)

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: How to set Panel.BevelWidth to 0?
« Reply #3 on: May 10, 2010, 09:06:38 am »
then remove border and try to use outer bevel with some style.

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: How to set Panel.BevelWidth to 0?
« Reply #4 on: May 10, 2010, 10:27:13 am »
then remove border and try to use outer bevel with some style.
It's impossible because BevelOuter property must be either bvRaised or bvLowered to display something at all. In both cases half of borders is white & another half is dark. I need  one-colour border , e.g. black.
WinXP SP3 Pro Russian 32-bit (5.1.2600)

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: How to set Panel.BevelWidth to 0?
« Reply #5 on: May 11, 2010, 12:06:17 am »
Disable both border and bevels and add Paint handler with the desired drawing.

anna

  • Sr. Member
  • ****
  • Posts: 426
Re: How to set Panel.BevelWidth to 0?
« Reply #6 on: October 28, 2011, 11:21:44 am »
I found another strange thing.Compontns inside tpanel move onto border:
http://img8.imageshack.us/img8/5716/24191351.png

I think must be like this:
http://img267.imageshack.us/img267/8660/27361248.png

How to repair?
WinXP SP3 Pro Russian 32-bit (5.1.2600)

 

TinyPortal © 2005-2018