iahngy Posted February 27, 2013 Posted February 27, 2013 (edited) I am going to create a list with certain items(_GUICtrlListBox_Create) ..but to get new items from user ...I create a single input box then get the data from input box (GUICtrlCreateInput) and display in the list? what is the best way to display a list and can be added multiple items in by user? Edited February 27, 2013 by iahngy
PhoenixXL Posted February 27, 2013 Posted February 27, 2013 Example#include <GUIConstants.au3> GUICreate(@ScriptName, 300, 350) $iList = GUICtrlCreateList("", 10, 10, 280, 180) $btnAdd = GUICtrlCreateButton("Add To List:", 10, 220, 100) $iInput = GUICtrlCreateInput("", 130, 220, 160) GUISetState() Local $sRead While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $btnAdd $sRead = GUICtrlRead($iInput) If $sRead <> '' Then GUICtrlSetData($iList, $sRead) EndSwitch WEndRegards My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
PhoenixXL Posted February 27, 2013 Posted February 27, 2013 Another example using the APIexpandcollapse popup#include <GuiListBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> _Main() Func _Main() Local $hListBox ; Create GUI GUICreate(@ScriptName, 300, 300) $hListBox = GUICtrlCreateList("First Line", 10, 10, 280, 180) $btnAdd = GUICtrlCreateButton("Add To List:", 10, 220, 100) $iInput = GUICtrlCreateInput("", 130, 220, 160) GUISetState() ; Loop until user exits Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $btnAdd AddString($hListBox, GUICtrlRead($iInput)) EndSwitch Until 0 GUIDelete() EndFunc ;==>_Main Func AddString($hListBox, $String) ; Add strings _GUICtrlListBox_BeginUpdate($hListBox) _GUICtrlListBox_AddString($hListBox, $String) _GUICtrlListBox_UpdateHScroll($hListBox) _GUICtrlListBox_EndUpdate($hListBox) EndFunc ;==>AddString My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
iahngy Posted February 27, 2013 Author Posted February 27, 2013 Thanks PhoenixXL. The 2nd one is cool..is there a list box where i just double click on the item then it is transfered to the another list box ?
PhoenixXL Posted February 27, 2013 Posted February 27, 2013 That you have to do !!check LBN_DBLCLK, with WM_COMMANDSearch the Forum for some examplesRegards My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
iahngy Posted February 28, 2013 Author Posted February 28, 2013 found one example of Melba..Thanks PhoenixXL
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now