Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   C++ Builder (https://www.clubdelphi.com/foros/forumdisplay.php?f=13)
-   -   Cambiar fuente PopupMenu (https://www.clubdelphi.com/foros/showthread.php?t=56082)

vivamotos 07-05-2008 12:27:39

Cambiar fuente PopupMenu
 
Saludos,

Quisiera saber si puedo agrandar la fuente de un PopupMenu o bien cambiar su color o algo parecido.

Grácias.

Lepe 07-05-2008 14:13:51

Así de forma fácil... no, ni la fuente ni el fondo ni el color. Aunque podrás usar un Popupmenu hecho por terceros www.torry.net y seguro que te permite modificar todos esos parámetros y algo más.

Saludos

cHackAll 07-05-2008 16:01:26

Código Delphi [-]
procedure TForm1.MenuItemDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; Selected: Boolean);
begin
 ACanvas.Font.Name := 'Comic Sans MS';
 ACanvas.Font.Color := clGreen;
 ACanvas.FillRect(ARect);
 Inc(ARect.Left, 5);
 with Sender as TMenuItem do
  DrawText(ACanvas.Handle, PChar(Caption), Length(Caption), ARect, 0)
end;

DFM;
Código:

  object PopupMenu1: TPopupMenu
    OwnerDraw = True
    object MenuItem1: TMenuItem
      Caption = '&Cut'
      OnDrawItem = MenuItemDrawItem
    end
    object MenuItem2: TMenuItem
      Caption = '&Copy'
      OnDrawItem = MenuItemDrawItem
    end
    object MenuItem3: TMenuItem
      Caption = '&Paste'
      OnDrawItem = MenuItemDrawItem
    end
    object MenuItem4: TMenuItem
      Caption = '&Delete'
      OnDrawItem = MenuItemDrawItem
    end
  end



La franja horaria es GMT +2. Ahora son las 07:17:24.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi