Board index » delphi » Bands from TCoolBar problem

Bands from TCoolBar problem

Hi,

I have 3 bands in a TCoolBar, and in runtime, I want to set them visible or
not visible. I'm trying the following:

First:
  barCoolbar.Bands.Items[0].Visible:=true;
  barCoolbar.Bands.Items[1].Visible:=true;
  barCoolbar.Bands.Items[2].Visible:=false;

Second:
  barCoolbar.Bands.Items[0].Visible:=true;
  barCoolbar.Bands.Items[1].Visible:=false;
  barCoolbar.Bands.Items[2].Visible:=true;

It doesn't matter where I have put the last band, whem in runtime I set it
to visible:=true, it appears at the end of the screen.
I've looked for a property like "Left" to the Band, but I didn't find it.
Can somebody help me please?

Padu

 

Re:Bands from TCoolBar problem


Hi...

Since version 4.71 of comctl32.dll you can send the RB_MAXIMIZEBAND
message to CoolBands:

    RB_MAXIMIZEBAND = WM_USER + 31
    wParam  = index of CoolBand

    Example:

    SendMessage( CoolBar.Handle, WM_USER + 31, 1, 0);

Hope I could help you

Joe

Padu - Paulo Eduardo Merloti wrote:

Quote
> Hi,

> I have 3 bands in a TCoolBar, and in runtime, I want to set them
> visible or
> not visible. I'm trying the following:

> First:
>   barCoolbar.Bands.Items[0].Visible:=true;
>   barCoolbar.Bands.Items[1].Visible:=true;
>   barCoolbar.Bands.Items[2].Visible:=false;

> Second:
>   barCoolbar.Bands.Items[0].Visible:=true;
>   barCoolbar.Bands.Items[1].Visible:=false;
>   barCoolbar.Bands.Items[2].Visible:=true;

> It doesn't matter where I have put the last band, whem in runtime I
> set it
> to visible:=true, it appears at the end of the screen.
> I've looked for a property like "Left" to the Band, but I didn't find
> it.
> Can somebody help me please?

> Padu

Re:Bands from TCoolBar problem


Hi...

Since version 4.71 of comctl32.dll you can send the RB_MAXIMIZEBAND
message to CoolBands:

    RB_MAXIMIZEBAND = WM_USER + 31
    wParam  = index of CoolBand

    Example:

    SendMessage( CoolBar.Handle, WM_USER + 31, 1, 0);

Hope I could help you

Joe

Padu - Paulo Eduardo Merloti wrote:

Quote
> Hi,

> I have 3 bands in a TCoolBar, and in runtime, I want to set them
> visible or
> not visible. I'm trying the following:

> First:
>   barCoolbar.Bands.Items[0].Visible:=true;
>   barCoolbar.Bands.Items[1].Visible:=true;
>   barCoolbar.Bands.Items[2].Visible:=false;

> Second:
>   barCoolbar.Bands.Items[0].Visible:=true;
>   barCoolbar.Bands.Items[1].Visible:=false;
>   barCoolbar.Bands.Items[2].Visible:=true;

> It doesn't matter where I have put the last band, whem in runtime I
> set it
> to visible:=true, it appears at the end of the screen.
> I've looked for a property like "Left" to the Band, but I didn't find
> it.
> Can somebody help me please?

> Padu

Other Threads