Jump to content
Sign in to follow this  
m1ch43l

how to sort by vertical in listbox?

Recommended Posts

m1ch43l

hi all member n master

i'm newbie and this is my first script

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 141, 280, 187, 122)

GUISetOnEvent($GUI_EVENT_CLOSE,"Form1Close")

$List1 = GUICtrlCreateList("", 8, 8, 121, 188)

GUICtrlCreateInput("", 8, 208, 121, 21)

$Button1 = GUICtrlCreateButton("Button1", 32, 240, 75, 25, 0)

GUICtrlSetOnEvent(-1, "Button1")

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Func Form1Close()

Exit

EndFunc

Func Button1()

$file = FileOpen("C:\test.txt",0)

$List1 = FileRead($file)

GUICtrlSetData(3,$List1)

EndFunc

and this the question are

1. how to appear name with vertical in $list1

for example in c:\test.txt-> apple

banana

grape

orange

but in $list1 when i click button1,the result is like this applebananagrapeorange

2. if i double click in $list1 box,how to send to input box automaticly appear?

thanx..

have a nice day all

Share this post


Link to post
Share on other sites
Minikori

hi all member n master

i'm newbie and this is my first script

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 141, 280, 187, 122)

GUISetOnEvent($GUI_EVENT_CLOSE,"Form1Close")

$List1 = GUICtrlCreateList("", 8, 8, 121, 188)

GUICtrlCreateInput("", 8, 208, 121, 21)

$Button1 = GUICtrlCreateButton("Button1", 32, 240, 75, 25, 0)

GUICtrlSetOnEvent(-1, "Button1")

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

Func Form1Close()

Exit

EndFunc

Func Button1()

$file = FileOpen("C:\test.txt",0)

$List1 = FileRead($file)

GUICtrlSetData(3,$List1)

EndFunc

and this the question are

1. how to appear name with vertical in $list1

for example in c:\test.txt-> apple

banana

grape

orange

but in $list1 when i click button1,the result is like this applebananagrapeorange

2. if i double click in $list1 box,how to send to input box automaticly appear?

thanx..

have a nice day all

Save your text file as apple|banana|grape|orange or do a stringreplace: @CRLF to "|" before changing data and after opening file (Make sure @CRLF has no quotes).

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites
m1ch43l

Save your text file as apple|banana|grape|orange or do a stringreplace: @CRLF to "|" before changing data and after opening file (Make sure @CRLF has no quotes).

thank a lot minikori.. finally i can do it:)

but the question number 2,i cannt do it:( please somebody help me,thanx..

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  

×