Hello Everyone,
I'm messing around with trying to make a right-click menu.
The rclick menu is initially not visible. When you rclick it becomes visible
only after the Top,Left coordinates is set to the cursor pos.
But it never appears near the cursor. It just jumps around. Top pos would be y. Because it's a vertical set. Left would be x, because it's accross.
Yet it no want to work. Me getting very upset! Maybe you can tell me why this is not working. Please.
JRL - Here's another "Why won't this work?"
Code: Select all
let>x=0
let>y=0
Dialog>Dialog1
object Dialog1: TForm
Left = 251
Top = 104
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 216
ClientWidth = 439
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object MSListBox1: tMSListBox
Left = 280
Top = 27
Width = 65
Height = 62
Style = lbOwnerDrawFixed
BevelEdges = []
BorderStyle = bsNone
ItemHeight = 13
TabOrder = 0
Visible = False
SelectedIndex = -1
end
object MSButton1: tMSButton
Left = 90
Top = 86
Width = 75
Height = 25
Caption = 'MSButton1'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 1
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
OnEvent>Key_Down,VK2,0,RghtClick
AddDialogHandler>Dialog1,,OnClose,Finish
Show>Dialog1
Label>Start
GetDialogAction>Dialog1,KeyStroke
Goto>Start
srt>RghtClick
GetCursorPos>x,y
sub>x,%x%
//sub>y,1
SetDialogProperty>Dialog1,MSListBox1,Left,%y%
SetDialogProperty>Dialog1,MSListBox1,Top,%x%
SetDialogProperty>Dialog1,MSListBox1,Visible,True
GetDialogProperty>Dialog1,MSListBox1,Left,Lft
GetDialogProperty>Dialog1,MSListBox1,Top,tp
//mdl>%x% %Lft% %tp%
END>RghtClick
srt>Finish
exit
END>Finish