TCustomPanel Derived and Caption

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #68195
    Delcio Sbeghen
    Participant

    Hi, Im create one TCustomPanel derived control and added it to Thirdparty list. But the Caption is showing even when ShowCaption = False;

    I added some code to acSBUtils, line 11045:

    
    procedure TacPanelWnd.WriteText(R: TRect; aCanvas: TCanvas);
    var
      Flags: Cardinal;
      h: integer;
    begin
      if (Panel = nil) or (Panel.Tag <> 999) then begin // If SilentPanel
        if SkinData.FOwnerControl <> nil then
          begin
            if (SkinData.FOwnerControl is TCustomPanel)
            and not TAccessPanel(SkinData.FOwnerControl).ShowCaption then
              Exit;
    
            aCanvas.Font.Assign(TacAccessControl(SkinData.FOwnerControl).Font);
          end;
    
        aCanvas.Brush.Style := bsClear;
        h := aCanvas.TextHeight('Wg');
        R.Top := (R.Bottom + R.Top - h) div 2;
        R.Bottom := R.Top + h;
        Flags := DT_VCENTER;
        if Panel <> nil then ... 

    Im not sure if is a better way;

    #68215
    Support
    Keymaster

    Hello! This changing will be added in the next release, thank you.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘TCustomPanel Derived and Caption’ is closed to new replies.