jWalker Posted October 24, 2011 Posted October 24, 2011 Hey! i searched the forums but all i find is how to focus and select in a listVIEW i want to select an item in a normal list... The list is refreshing every second... If you Click on an item to select it, and the list refreshes, the item is deselected... any way to avoid that? or just select this item again after the list refreshes?
Command3r Posted October 24, 2011 Posted October 24, 2011 (edited) My suggestions: maybe make the list refreshes evey 10seconds ?? or make an button to refresh the list Edited October 24, 2011 by Command3r [font="arial, helvetica, sans-serif;"]Advice for you[/font][font="arial, helvetica, sans-serif;"]: [/font][u]Search[/u] before posting. [font="arial, helvetica, sans-serif;"] *********** Problem solved? if yes [/font][color=rgb(0,0,0);font-family:arial, helvetica, sans-serif;] *********[/color] [font="arial, helvetica, sans-serif;"]******* press "Mark Solved" button. *******[/font]
jWalker Posted October 24, 2011 Author Posted October 24, 2011 yeah but then the item is deselected every 10 seconds...
Command3r Posted October 24, 2011 Posted October 24, 2011 or make an button to refresh the listor u want to refreshes automaticly without deselecting the item? [font="arial, helvetica, sans-serif;"]Advice for you[/font][font="arial, helvetica, sans-serif;"]: [/font][u]Search[/u] before posting. [font="arial, helvetica, sans-serif;"] *********** Problem solved? if yes [/font][color=rgb(0,0,0);font-family:arial, helvetica, sans-serif;] *********[/color] [font="arial, helvetica, sans-serif;"]******* press "Mark Solved" button. *******[/font]
jWalker Posted October 24, 2011 Author Posted October 24, 2011 Yes, that's what i want... As long as the program runs - the list is refreshing... If you select an item, and the list refreshes, it is automatically deselected. That is what i want to avoid.
Command3r Posted October 24, 2011 Posted October 24, 2011 (edited) why want you the list refresh every second?? and the list u're talking about have more values or just 1 value, please add a script explaining what you need to can help you. Command3r Edited October 24, 2011 by Command3r [font="arial, helvetica, sans-serif;"]Advice for you[/font][font="arial, helvetica, sans-serif;"]: [/font][u]Search[/u] before posting. [font="arial, helvetica, sans-serif;"] *********** Problem solved? if yes [/font][color=rgb(0,0,0);font-family:arial, helvetica, sans-serif;] *********[/color] [font="arial, helvetica, sans-serif;"]******* press "Mark Solved" button. *******[/font]
jWalker Posted October 24, 2011 Author Posted October 24, 2011 Its a chat... you have the list of all available PCs in your local network. Func _RefreshOnlineStatus() $Folders = _FileListToArray( $ODIR, "*", 2 ) For $i = 1 To $Folders[0] $FILE = FileOpen( $ODIR&$Folders[$i]&"\onl.ine", 2 ) FileWrite( $FILE, "0" ) FileClose( $FILE ) Next Sleep( 300 ) $listdata = "" GUICtrlSetData( $AvailablePCs, "" ) For $i = 1 To $Folders[0] $FILE = FileOpen( $ODIR&$Folders[$i]&"\onl.ine" ) $Check = FileRead( $FILE ) FileClose( $FILE ) If $Check = "1" Then If $i = $Folders[0] Then $listdata = $listdata&$Folders[$i] Else $listdata = $listdata&$Folders[$i]&"|" EndIf EndIf Next GUICtrlSetData( $AvailablePCs, $listdata ) EndFunc Lets say i pick PC4 in my list view. The list refreshes and PC4 is deselected because the list gets deleted and gets written new after that... So is there a function to select a list item?
AdmiralAlkex Posted October 24, 2011 Posted October 24, 2011 _GUICtrlListBox_SetCurSel()? jWalker 1 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
jWalker Posted October 24, 2011 Author Posted October 24, 2011 _GUICtrlListBox_SetCurSel()? Thanks i'd better take a look at all these _GUI functions...
Command3r Posted October 24, 2011 Posted October 24, 2011 Check [font="arial, helvetica, sans-serif;"]Advice for you[/font][font="arial, helvetica, sans-serif;"]: [/font][u]Search[/u] before posting. [font="arial, helvetica, sans-serif;"] *********** Problem solved? if yes [/font][color=rgb(0,0,0);font-family:arial, helvetica, sans-serif;] *********[/color] [font="arial, helvetica, sans-serif;"]******* press "Mark Solved" button. *******[/font]
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