[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

TControlBar problem

Posted on 2001-07-14
4
Medium Priority
?
345 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 300 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

825 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