Jump to content

Search the Community

Showing results for tags 'guictrlonhover.au3'.

  • 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. First, I want to thank both authors of these great UDF's. I just can't seem to get them to work nice together. Any and all help would be appreciated, as I've tried for the past 3 days to get a row to highlight in the table while mousing over it. #include <Table.au3> #include <GUICtrlOnHover.au3> Global $NewCode = "Create New Code" Global $TestHL = "Test Highlight a row in Table" $GUI = GUICreate ("", 450, 450, -1, -1, -1, 0x2000000);----- GUI (Double Buffered) ----- GUICtrlCreateLabel ($TestHL, 40, 10, 400, 40) GUICtrlSetFont (-1, 18,600) $LbCreateCode = GUICtrlCreateLabel ($NewCode, 22, 60, 110, 20) GUICtrlSetColor (-1, 0x0000ff);blue GUICtrlSetFont (-1, 10,400) $Button = GUICtrlCreateButton ("Test Highlight", 22, 90, 100, 20) _GUICtrl_OnHoverRegister($LbCreateCode, "_Hover_Func", "_Hover_Func") _GUICtrl_OnHoverRegister($Button, "_Hover_Func", "_Hover_Func") GUISetState();----- Make sure GUI exists BEFORE creating Tables ----- GUISetState(@SW_LOCK);----- Lock GUI until tables drawn ----- GUICtrlCreateLabel(" Example 1 ", 25, 250, 100, 13);----- Table Example 4 ----- $Table4 = _GUICtrlTable_Create (35, 268, 62, 18, 8, 6, 0) _GUICtrlTable_Set_RowHeight ($Table4, 1, 35) _GUICtrlTable_Set_Justify_All ($Table4, 1, 1) _GUICtrlTable_Set_TextFont_All ($Table4, 8.5, 800, 0, "Tahoma") _GUICtrlTable_Set_CellColor_Row ($Table4, 1, 0x555555) _GUICtrlTable_Set_TextColor_All ($Table4, 0x555555) _GUICtrlTable_Set_TextColor_Row ($Table4, 1, 0xFFFFFF) For $row = 3 To 10 Step 2 _GUICtrlTable_Set_CellColor_Row($Table4, $row, 0xDDDDDD) Next _GUICtrlTable_Set_Text_Row ($Table4, 1, "Fixing|Size|Weight|Net|Gross|Order") _GUICtrlTable_Set_Text_Row ($Table4, 2, "Block|20.0|0.01|300|340|No") _GUICtrlTable_Set_Text_Row ($Table4, 3, "Screw|8.5|0.3|50|100|No") _GUICtrlTable_Set_Text_Row ($Table4, 4, "Rivet|0.1|0.4|10|11|Yes") _GUICtrlTable_Set_Text_Row ($Table4, 5, "Rope|300.0|100.0|2|10|No") _GUICtrlTable_Set_Text_Row ($Table4, 6, "Tack|10.6|0.3|1000|1011|Yes") _GUICtrlTable_Set_Text_Row ($Table4, 7, "Nail|30.3|0.4|400|600|No") _GUICtrlTable_Set_Text_Row ($Table4, 8, "Staple|0.3|0.05|10000|12000|No") _GUICtrlTable_Set_Border_Table($Table4, 0x555555) GUISetState(@SW_UNLOCK) for $x = 1 to 8 for $y = 1 to 6 _GUICtrl_OnHoverRegister($Table4[$x][$y], "_Hover_Func", "_Hover_Func") Next Next Do;----- Loop ----- Sleep(10) $m = MouseGetPos() Until GUIGetMsg() = -3 Func _Hover_Func($iCtrlID, $iParam) Local $sConsole_Data = "Hovered" Local $iLabel_Color = 0x00000FF;0x0000ff Local $iLabel_FontAttrib = 4 Local $iTable1_highlight_Color1 = 0xFFD700 Local $iTable1_highlight_Color2 = 0xFFD700 If $iParam = 2 Then ;Indicates On *Leave* Hover process $sConsole_Data = "NOT Hovered" $iLabel_Color = 0x0000ff $iLabel_FontAttrib = 0 $iTable1_highlight_Color1 = 0xFFFFFF $iTable1_highlight_Color2 = 0xDDDDDD EndIf Printf("Control " & $iCtrlID & " [Data: " & GUICtrlRead($iCtrlID, 1) & "] Is Now " & $sConsole_Data) Switch $iCtrlID Case $LbCreateCode GUICtrlSetColor($iCtrlID, $iLabel_Color) GUICtrlSetFont($iCtrlID, 10, 400, $iLabel_FontAttrib) Case $Table4[2][1] _GUICtrlTable_Set_CellColor_Row($Table4, 2, $iTable1_highlight_Color1) Case $Table4[3][1] _GUICtrlTable_Set_CellColor_Row($Table4, 3, $iTable1_highlight_Color2) Case $Button _GUICtrlTable_Set_CellColor_Row($Table4, 2, $iTable1_highlight_Color1) EndSwitch EndFunc Func Printf($Str, $Line=@ScriptLineNumber) ConsoleWrite("!===========================================================" & @LF & _ "+======================================================" & @LF & _ "--> Script Line (" & $Line & "):" & @LF & "!" & @TAB & $Str & @LF & _ "+======================================================" & @LF) EndFunc I've modified the table example to be closer to my actual project, and I'm trying to hover the mouse over the rows in the table to highlight the entire row, regardless of which cell in the row I'm hovering over. in this example, hovering over the button gives the desired effect (as an example). I've also only coded looking specifically at 2 cells for now, to highlight the entire row (I'll add more later if I can get this to work). Thoughts? and thanks in advance. I LOVE AutoIT and this community!!!
×
×
  • Create New...