Solved

TControlBar problem

Posted on 2001-07-14
4
317 Views
Last Modified: 2010-08-05
TControlBar problem

// Button1 is on Form1 and Panel1 is on ControlBar1
// After clicking Button1 I want that Panel1 has this size and position on ControlBar1
// Top = 100
// Left = 100
// Height = 100
// Width = 100
// whatever ControlBar1 size is.


unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    ControlBar1: TControlBar;
    Panel1: TPanel;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
Panel1.Top:=100;
Panel1.Left:=100;
Panel1.Height:=100;
Panel1.Width:=100;
end;

end.
0
Comment
Question by:gfdas
  • 2
4 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 6281904
Set ControlBar1.AutoSize := true  ?
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6281909
Hello

  your code work fine, what's the problem with that?

  just insure that the panel1 autosize property set to false

Mohammed
0
 

Author Comment

by:gfdas
ID: 6281966
When I move Panel1 on ControlBar1 I can just move it left and right not up and down. Can that be enabled ?

So, when I press Button1 for top position of Panel1 to 100 ControlBar1 set it to 2. I whant that that is disabled.

Setting ControlBar1.AutoSize := true is not helping.
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 100 total points
ID: 6281975
If you put another control on the ControlBsr then you can move up an down. It's just the way it is, I guess...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question