Sign in to follow this  
Followers 0
jWalker

GUI LIST Select an item

10 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

My suggestions:

maybe make the list refreshes evey 10seconds ??

or make an button to refresh the list

Edited 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]

Share this post


Link to post
Share on other sites

yeah but then the item is deselected every 10 seconds...

Share this post


Link to post
Share on other sites

or make an button to refresh the list

or 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]

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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. :graduated:

Command3r

Edited 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]

Share this post


Link to post
Share on other sites

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? :graduated:

Share this post


Link to post
Share on other sites

_GUICtrlListBox_SetCurSel()?

Thanks :graduated: i'd better take a look at all these _GUI functions...

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0