### Bookstore

 Computer Math and Games in Pascal (preview) Lazarus Handbook

### Recent

#### Pe3s

• Full Member
• Posts: 145
« on: November 30, 2021, 09:45:16 pm »
How can I fix the code to get rid of this gray frame.
Code: Pascal  [Select][+][-]
1. procedure TForm1.PopupMenu1DrawItem(Sender: TObject; ACanvas: TCanvas;
2.   ARect: TRect; AState: TOwnerDrawState);
3. var
4.   x, y: Integer;
5. begin
7.
8.   if AState * [odSelected, odFocused] <> [] then begin
9.     ACanvas.Brush.Color := RGBToColor(216, 215, 255);
10.     ACanvas.Pen.Color := RGBToColor(190, 190, 230);
11.     ACanvas.Rectangle(ARect);
12.     //ACanvas.Font.Style := [fsBold];
13.   end
14.   else
16.
17.   x := 2;
18.   y := (ARect.Top + ARect.Bottom - ImageList1.Height) div 2;
20.
21.   x := x + ImageList1.Width + 4;
22.   ACanvas.Pen.Color := clGray;
23.   ACanvas.Line(x, ARect.Top, x, ARect.Bottom);
24.
25.   x := x + 4;
26.   y := (ARect.Top + ARect.Bottom - ACanvas.TextHeight('Tg')) div 2;
27.   ACanvas.Brush.Style := bsClear;
29.
30. end;
« Last Edit: December 01, 2021, 07:52:15 pm by Pe3s »

#### Pe3s

• Full Member
• Posts: 145
« Reply #1 on: December 01, 2021, 07:38:34 am »
@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
« Last Edit: December 01, 2021, 01:33:51 pm by Pe3s »

#### Pe3s

• Full Member
• Posts: 145
« Reply #2 on: December 01, 2021, 07:51:53 pm »
Thank you