[CLOSED] Custom PopUpMenu lazarus / 31-LCL ---------------------------------------------------------------------- Pe3s · 2021-11-30 20:45 How can I fix the code to get rid of this gray frame. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.PopupMenu1DrawItem(Sender: TObject; ACanvas: TCanvas;  ARect: TRect; AState: TOwnerDrawState);var  x, y: Integer;begin  ACanvas.Font.Assign(Screen.MenuFont);   if AState * [odSelected, odFocused] <> [] then begin    ACanvas.Brush.Color := RGBToColor(216, 215, 255);    ACanvas.Pen.Color := RGBToColor(190, 190, 230);    ACanvas.Rectangle(ARect);    //ACanvas.Font.Style := [fsBold];  end  else    ACanvas.GradientFill(ARect, clSkyBlue, clSkyBlue, gdHorizontal);   x := 2;  y := (ARect.Top + ARect.Bottom - ImageList1.Height) div 2;  ImageList1.Draw(ACanvas, x, y, TMenuItem(Sender).ImageIndex, TMenuItem(Sender).Enabled);;   x := x + ImageList1.Width + 4;  ACanvas.Pen.Color := clGray;  ACanvas.Line(x, ARect.Top, x, ARect.Bottom);   x := x + 4;  y := (ARect.Top + ARect.Bottom - ACanvas.TextHeight('Tg')) div 2;  ACanvas.Brush.Style := bsClear;  ACanvas.TextOut(x, y,  TMenuItem(Sender).Caption); end; ---------------------------------------------------------------------- Pe3s · 2021-12-01 06:38 @Jamie My point was to fill the entire background of the menu with color.  I don't want to remove the shadow. Remove white border ---------------------------------------------------------------------- Pe3s · 2021-12-01 18:51 Thank you