OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: MiD-AwE on November 05, 2013, 09:02:18 AM

Title: Underline Label Caption on MouseOver?
Post by: MiD-AwE on November 05, 2013, 09:02:18 AM
Hi all,

I have a modal form with several text labels. I want the text labels to underline like a URL once the mouse moves over the Label. I have checked the MouseMove Event but I'm not sure how to gain access to the underline property of the text.

Can anyone help with this?

Thank you.
Title: Re: Underline Label Caption on MouseOver?
Post by: Fred Tomke on November 05, 2013, 09:31:32 AM
Hi, have a try with
Code (autolisp) Select
(dcl_Control_SetFontUnderline Unbenannt_Dialog1_Bezeichnung1 isNewValue [als Boolean])
Regards, Fred
Title: Re: Underline Label Caption on MouseOver?
Post by: MiD-AwE on November 05, 2013, 10:27:55 AM
Thank you Fred.  :)

That works great. But, how would I go about removing the underline on MouseLeave?

Thank you.

BTW- I tried:
(while (= Flags 0)
    (DCL_CONTROL_SETFONTUNDERLINE CNTRL-PNL_SoftscapeForm_GraniteLinkLabel "true")
    (DCL_CONTROL_SETFONTUNDERLINE CNTRL-PNL_SoftscapeForm_GraniteLinkLabel "false")
  )

The underline flashes for a while then AutoCAD Crashes. What is the correct way to do this?
Title: Re: Underline Label Caption on MouseOver?
Post by: Fred Tomke on November 05, 2013, 11:40:57 AM
Hi, put a picture box behind the labels with color -16 in background. Activate OnMouseEntered event and whenever you leave the caption you enter the picturebox, then you can remove alle the underlines from the labels.

Fred
Title: Re: Underline Label Caption on MouseOver?
Post by: MiD-AwE on November 05, 2013, 03:30:08 PM
 :D
Very Clever Fred. Thank you.

(Kinda a hack, but it'll do)