MouseMove

Started by Mast, November 25, 2007, 07:13:56 AM

Previous topic - Next topic

Mast

Hi, There is my problem: i have "Ok" button, with clicked and MouseMove events, and "Allow" for properties. my mouse is over de "ok" (see open3.jpg) and you see on left the change. my mouse is not over and you don't on the left (see open1.jpg). it's ok, but when i click "ok" the problem is the "open4.jpg". what's matter. thanks

PS : i saw where is the problem : it's (Dcl_Form_Close Gddock_Form2) line, but how make for work fine ?  ???


;ANNULE ET FERME BOUTON ANNULE
(Defun C:Gddock_Form2_Textbutton3_Onclicked ( /)

(Dcl_Form_Close Gddock_Form2)
)
;------------------------------------------------
; BOUTON OK
(Defun C:Gddock_Form2_Textbutton2_Onmousemove (Nflags Nx Ny /)

(Dcl_Control_Setvisible Gddock_Form2_Label20 1)
)
;------------------------------------------------
; ANNULE BOUTON
(Defun C:Gddock_Form2_Textbutton3_Onmousemove (Nflags Nx Ny /)
(Dcl_Control_Setvisible Gddock_Form2_Label20 0)

)
;------------------------------------------------
;TRAITEMENT PAR OK BOUTON

(Defun C:Gddock_Form2_Textbutton2_Onclicked ( /)

   (Dcl_Form_Close Gddock_Form2) ; Ferme la boite principale.   
  (Command "Scu" "")
  (Setq Old_Accroch (Getvar "Osmode"))
  (Command "Accrobj" "Ext,Cent")
  (Setq Planac (Getvar "Clayer"))
)


[attachment deleted by admin]

owenwengerd

You'll have to modify your code to detect the case where the form gets closed before the OnMouseMove event is triggered. For example:
(if Gddock_Form2_Label20 (Dcl_Control_Setvisible Gddock_Form2_Label20 0))

Mast

Thank you very much owenwengerd. it work fine.