Solved

TControlBar problem

Posted on 2001-07-14
4
311 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:mnasman
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now