TrzSatusPane : bac

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #2632
      Eddy Poullet
      Participant

        Hi,

        How is it possible to change the backgorund color and the color font of a rzStatusPane. I try this but is unsuccesfull.
        Thanks a lot,
        Eddy

        procedure TMainFr.ApplicationEvents1Idle(Sender: TObject; var Done: Boolean);
        begin
        case ePCstatus of
        pcClosed:
        begin
        PCstatusPane.FillColor := clRed;
        PCstatusPane.Font.Color := clWhite;
        PCStatusPane.Caption := ‘Disconnected’;
        end;
        pcPortOpen:
        begin
        PCstatusPane.FillColor := clTeal;
        PCStatusPane.Caption := ‘Open’;
        PCstatusPane.Font.Color := clWhite;
        end;
        ….
        end;`
        `

      • #2634
        Ray Konopka
        Keymaster

          Hi,

          Set the Transparent property of the status pane to False and you will see the FillColor property take effect.

          Ray

        • #2663
          Eddy Poullet
          Participant

            Hi Ray,
            Thanks for the reply.
            Setting the rzStatusPane’s property Transparent to False doesn’t change the background color (at design- and run-time) in my case (D11/D10.4.2-Component version 7). Very strange. Below the dfm part for the RzStatusPane.
            Regards,
            Eddy

            object RzStatusPane1: TRzStatusPane
            Left = 0
            Top = 0
            Width = 177
            Height = 19
            FillColor = clRed
            ParentFillColor = False
            Transparent = False
            Align = alLeft
            Color = clAqua
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clLime
            Font.Height = -12
            Font.Name = ‘Segoe UI’
            Font.Style = []
            ParentColor = False
            ParentFont = False
            Alignment = taCenter
            Caption = ‘Hello’
            end

          • #2666
            Ray Konopka
            Keymaster

              Hi,

              I copied the component (from your post) and pasted it into a new VCL Form and the status pane was created on the form, and it showed a red background (i.e. FillColor) with lime text. I ran the app and the status pane also displayed correctly.

              It sounds like there is something else interfering with the component. Have you tried creating a new test project and changing the FillColor of a TRzStatusPane along with setting Transparent to False?

              Ray

            • #2751
              Eddy Poullet
              Participant

                Thanks for the reply.
                In fact, when the property VisualStyle is set to vsWinXP, the color doesn’t change.
                Regards,
                Eddy

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.