Jump to content

Search the Community

Showing results for tags 'panels with edit'.

  • 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. Hello everyone, How to transform the code below into something dynamic? To add 'n' elements as panels with show/hide information and still work. Tried to optimize the code as much as possible : ;INCLUDES #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) ;ELEMENTS $FORM = GUICreate("Example", 615, 192, -1, -1, -1, -1, 0) $ELEMENT_1_INFO_CLICK = GUICtrlCreateLabel("Element 1 info", 16, 16, 87, 20) $ELEMENT_1_INFO = GUICtrlCreateEdit("", 16, 48, 185, 33, $ES_WANTRETURN, 0) $ELEMENT_2_INFO_CLICK = GUICtrlCreateLabel("Element 2 info", 16, 96, 87, 20) $ELEMENT_2_INFO = GUICtrlCreateEdit("", 16, 128, 185, 33, $ES_WANTRETURN, 0) ;DESIGN GUISetBkColor(0xFFFFFF, $FORM) GUISetOnEvent($GUI_EVENT_CLOSE, _Exit, $FORM) GUICtrlSetFont($ELEMENT_1_INFO_CLICK, 10, 400, 4, "Arial") GUICtrlSetCursor($ELEMENT_1_INFO_CLICK, 0) GUICtrlSetData($ELEMENT_1_INFO, StringFormat("ELEMENT 1 DETAILED INFO CHECK \r\nHIDDEN")) GUICtrlSetOnEvent($ELEMENT_1_INFO_CLICK, '_ELEMENT_1_INFO_CLICK') GUICtrlSetFont($ELEMENT_2_INFO_CLICK, 10, 400, 4, "Arial") GUICtrlSetCursor($ELEMENT_2_INFO_CLICK, 0) GUICtrlSetData($ELEMENT_2_INFO, StringFormat("ELEMENT 2 DETAILED INFO CHECK \r\nHIDDEN")) GUICtrlSetOnEvent($ELEMENT_2_INFO_CLICK, '_ELEMENT_2_INFO_CLICK') GUISetState(@SW_SHOW, $FORM) While 1 WEnd ;FUNCTIONS Func _Exit() Exit EndFunc ;==>_Exit Func _ELEMENT_1_INFO_CLICK() If GUICtrlGetState($ELEMENT_1_INFO) = 96 Then GUICtrlSetState($ELEMENT_1_INFO, $GUI_SHOW) GUICtrlSetPos($ELEMENT_2_INFO_CLICK, 16, 96) GUICtrlSetPos($ELEMENT_2_INFO, 16, 128) ElseIf GUICtrlGetState($ELEMENT_1_INFO) = 80 Then GUICtrlSetState($ELEMENT_1_INFO, $GUI_HIDE) GUICtrlSetPos($ELEMENT_2_INFO_CLICK, 16, 48) GUICtrlSetPos($ELEMENT_2_INFO, 16, 78) EndIf EndFunc ;==>_ELEMENT_1_INFO_CLICK Func _ELEMENT_2_INFO_CLICK() If GUICtrlGetState($ELEMENT_2_INFO) = 96 Then GUICtrlSetState($ELEMENT_2_INFO, $GUI_SHOW) ElseIf GUICtrlGetState($ELEMENT_2_INFO) = 80 Then GUICtrlSetState($ELEMENT_2_INFO, $GUI_HIDE) EndIf EndFunc ;==>_ELEMENT_2_INFO_CLICK Many thanks. PS : Any tips making the code more compact and efficient would be cool.
×
×
  • Create New...