Gui Management UDFs
#1
Posted 13 September 2005 - 01:37 AM
This would take some time but I think it would be worth the work, it would make the Functions a little more versitile.
Gary
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#2
Posted 13 September 2005 - 02:25 AM
LRESULT SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
#3
Posted 13 September 2005 - 03:09 AM
Yep that would be the plan, for example:looks like it would require switching over from the Autoit GUICtrlSendMsg() to using the "SendMessage" DllCall using a handle instead of a ControlId. or have the functions accept either one...
LRESULT SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
Func _GUICtrlComboAddString($h_combobox, $s_text) Return GUICtrlSendMsg($h_combobox, $CB_ADDSTRING, 0, $s_text) EndFunc ;==>_GUICtrlComboAddString
would become:
Func _GUICtrlComboAddString($h_combobox, $s_text) If IsHWnd($h_combobox) Then Local $a_ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_combobox, "int", $CB_ADDSTRING, "int", 0, "str", $s_text) Return $a_ret[0] Else Return GUICtrlSendMsg($h_combobox, $CB_ADDSTRING, 0, $s_text) EndIf EndFunc ;==>_GUICtrlComboAddString
More code involved but it works both ways.
Gary
Edited by gafrost, 13 September 2005 - 03:22 AM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#4
Posted 13 September 2005 - 01:25 PM
If anyone is interested in helping test the functions here's what I have so far.
feedback/comments welcome.
Gary
Edit: added GuiList
Edit: added GuiMonthCal
Edit: added GuiTab
Edit: Removed Attachments
Edited by gafrost, 02 December 2005 - 02:35 PM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#5
Posted 14 September 2005 - 03:13 PM
Edited by gafrost, 19 September 2005 - 01:17 AM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#6
Posted 19 September 2005 - 01:19 AM
Edit: code correction for Delete all items (GuiListView.au3)
Edit: Removed Attachments
Edited by gafrost, 02 December 2005 - 02:36 PM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#7
Posted 19 September 2005 - 01:54 AM
Great work Garry!!!
#9
Posted 01 November 2005 - 10:15 AM
Is there any way to easily select an item in a single-selection list box by index?
Potentially relevant functions offered by GUIList.au3:
- _GUICtrlListSelItemRange
- _GUICtrlListSelItemRangeEx
- _GUICtrlListSetTopIndex
Edited by LxP, 01 November 2005 - 11:26 AM.
#10
Posted 01 November 2005 - 11:59 AM
Thanks Gary -- fantastic work!
![]()
Is there any way to easily select an item in a single-selection list box by index?
Potentially relevant functions offered by GUIList.au3:_GUICtrlListSetTopIndex() didn't do the job. _GUICtrlListSelItemRange() and _GUICtrlListSelItemRangeEx() 'DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES'. I can use _GUICtrlListSelectString() but this approach requires reading the string with _GUICtrlListGetText() first, and surely there's a way around that.
- <li>_GUICtrlListSelItemRange
- _GUICtrlListSelItemRangeEx
- _GUICtrlListSetTopIndex
_GUICtrlListSelectIndex
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#12
Posted 01 November 2005 - 12:26 PM
Call me crazy but there doesn't seem to be a _GUICtrlListSelectIndex() in that file...
Edit: I'm using the GUIList.au3 offered via this post.
Hadn't added that one to this file yet:
;=============================================================================== ; ; Description: _GUICtrlListSelectIndex ; Parameter(s): $h_listbox - controlID ; $i_index - Specifies the zero-based index of the list box item ; Requirement: ; Return Value(s): If an error occurs, the return value is $LB_ERR. ; If the $i_index parameter is –1, the return value is $LB_ERR even though no error occurred. ; User CallTip: _GUICtrlListSelectIndex($h_listbox, $i_index) Select a string and scroll it into view, if necessary (required: <GuiList.au3>) ; Author(s): Sokko, Documented and Added To UDFs (Gary Frost (custompcs@charter.net)) ; Note(s): Use this message only with single-selection list boxes. ; You cannot use it to set or remove a selection in a multiple-selection list box. ; ;=============================================================================== Func _GUICtrlListSelectIndex($h_listbox, $i_index) If IsHWnd($h_listbox) Then Local $a_ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_listbox, "int", $LB_SETCURSEL, "int", $i_index, "int", 0) Return $a_ret[0] Else Return GUICtrlSendMsg($h_listbox, $LB_SETCURSEL, $i_index, 0) EndIf EndFunc;==>_GUICtrlListSelectIndex
Updated the include in above post.
Edited by gafrost, 01 November 2005 - 01:01 PM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#13
Posted 01 November 2005 - 10:52 PM
#14
Posted 29 November 2005 - 07:32 PM
So when are these going to be replacing the UDF's in the Beta release?
Mike
#15
Posted 29 November 2005 - 07:41 PM
Thank you, Thank you, Thank you, Gafrost
So when are these going to be replacing the UDF's in the Beta release?
Mike
Been waiting on some treeview stuff, but might be a while.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#16
Posted 02 December 2005 - 02:38 PM
- GuiCombo
- GuiEdit
- GuiList
- GuiListView
- GuiMonthCal
- GuiTab
Edited by gafrost, 02 December 2005 - 02:38 PM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#17
Posted 02 December 2005 - 09:23 PM
Cheers
#18
Posted 02 December 2005 - 10:50 PM
Gary, for the newbs like me who don't know which way to vote, can you explain exactly what it is that you are trying to achieve by converting some AutoIt GUI controls so that they can be used with non-AutoIt controls? For a start, what are non-AutoIt controls?
Cheers
Vote don't matter, it's been done
As to what am trying to accomplish, for users who are trying to manipulate controls outside of an autoit gui script, they now have the udf's to accomplish most of the tasks.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
#19
Posted 22 December 2005 - 05:08 AM
Gary, the GUITreeView UDF library for foreign TreeViews doesn't seem to be included with the latest beta. Where can I obtain a copy of the library in the meantime?Submitted to be Updated in UDF includes:
...
#20
Posted 20 January 2006 - 11:55 AM
It is a shame that we can only edit the first column. $LVS_EDITLABELS ideally should enable editing for all columns and rows.Looking at making the Gui Management UDFs, GuiComb, GuiList, etc... work with non-AutoIt controls, this would require adding a couple of optional params to most if not all functions.
This would take some time but I think it would be worth the work, it would make the Functions a little more versitile.
Gary
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



This topic is locked

