Solved

TControlBar problem

Posted on 2001-07-14
4
326 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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