Jump to content

Search the Community

Showing results for tags 'font weight'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi all, is there any way to get the font weight of a label? Setting the font weight is easy going (GUICtrlSetFont), but reading it is not so much fun. Background (what I want to achieve): in my tools, there are lots of labels. The User shall be able to copy the label-text by clicking on it. But I want to differ between the static labels (the description-labels) and the labels containing the useful informations. The latter ones are bold (font weight 800), the other ones are not. Example: #include <GUIConstants.au3> $Form1 = GUICreate("Test", 250, 50, -1, -1) GUICtrlCreateLabel("Username:", 10, 10, 90, 17) $lbl_name = GUICtrlCreateLabel("Jane Doe", 100, 10, 90, 17) GUICtrlSetFont(-1, -1, 800) GUISetState(@SW_SHOW, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case -100 To 0 ; ignore Case Else $tmp = GUICtrlRead($nMsg) ClipPut($tmp) MsgBox(0, "Text has been copied", $tmp) EndSwitch Sleep(50) WEnd In this form, I want the text of $lbl_name to get copied when the label is clicked on, but when clicking the label without a variable, nothing shall happen. Of course, I could throw each and every $lbl-variable into an separate Case-segment in the switch-statement. But I am looking for a more lazy generic solution, what brought me to the idea of "if _labelfontwidth($nMsg)<800 then Continueloop". Any ideas?
×
×
  • Create New...