Jump to content

help with list creation


Ripper
 Share

Recommended Posts

Hi

I'm a new user to autoit.I hav read through the doc of autoit but dint find a soln

neither in the forums.

I want to create a list with drag n drop support but without the need of an input

or edit box

All the examples i came so far alow drag n drop with the help of input or edit box

We hav to drop the file in the input box to put in the list

But is it possible to create the list without input or edit box just like that of

winamp or windows media player

please help

I use autoit 3.1.1.93 beta

Link to comment
Share on other sites

Hi

I'm a new user to autoit.I hav read through the doc of autoit but dint find a soln

neither in the forums.

I want to create a list with drag n drop support but without the need of an input

or edit box

All the examples i came so far alow drag n drop with the help of input or edit box

We hav to drop the file in the input box to put in the list

But is it possible to create the list without input or edit box just like that of

winamp or windows media player

please help

I use autoit 3.1.1.93 beta

couldn't you use an edit box like a list box? i mean one element per line, drag and drop functionality... just lock it so that the user can't type and they won't be able to tell the difference.
Link to comment
Share on other sites

i managed to mak read only list but is there a way to hide blinkin character

#include <GUIConstants.au3>
GUICreate("Edit box",150,150)

GUICtrlCreateEdit("Edit list",20,20,100,100,$ES_READONLY,$WS_EX_ACCEPTFILES)
GUISetState(@SW_SHOW)

do
    $msg = GUIGetMsg()
    
until $msg = $GUI_EVENT_CLOSE
Link to comment
Share on other sites

maybe like this

#Include <GUIConstants.au3
#include <File.au3>


$loc = "C:\temp\"


GUICreate("MY GUI")
$edit = GUICtrlCreateEdit("", 25, 20, 350, 350)
GUISetState()

$list = _FileListToArray($loc, "*.*", 1)

for $x = 1 to $list[0]
    GUICtrlSetData( $edit, ($list[$x]) & @CRLF, 1 )
    GUICtrlSetData( $edit, " " & @CRLF, 1)
Next
    

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    
    EndSelect
WEnd

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

As i siad i m stupid

i dint hav a path c:\temp

i tried it with c:\ and worked

but u dint understand my problem

I want 2 create list by drag n drop without using edit or input box

jus lik that of winamp or WMP

thnx for helping

Link to comment
Share on other sites

ok but u'll hav Windows media player

u jus drag n drop files in the playlist the same way

i.e

I want to create a list usin box using GUIctrlcreatelist

and allow drag n drop on to it

without using guictrledit or guictrlinput

I hop i mad it clear if not plz ask again wat u dint understood

Thnx anyway u r the only 1 to reply me

Link to comment
Share on other sites

nope... i couldn't get it... this is as close as i could get "visual only"

#include <GUIConstants.au3>


GUICreate("My GUI list", 400, 400, -1, -1, -1, $WS_EX_ACCEPTFILES ); will create a dialog box that when displayed is centered

$mylist=GUICtrlCreateList ("First song", 100,30,200,150);, BitOR($WS_TABSTOP, $LBS_NOTIFY), $WS_EX_ACCEPTFILES )
GUICtrlSetState(-1, $GUI_ACCEPTFILES)
;GUICtrlSetState( -1, $GUI_DROPACCEPTED)

$add_line = GUICtrlCreateInput("", 100, 179, 200, 20);, -1,  $WS_EX_ACCEPTFILES )  
GUICtrlSetState(-1, $GUI_ACCEPTFILES)
;GUICtrlSetState( -1, $GUI_DROPACCEPTED)

$close=GUICtrlCreateButton ("my closing button", 110,260,175,25)

GUISetState ()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()

    Select
         
         Case $msg = $close
            MsgBox(0,"", "the closing button has been clicked",2)
            Exit
    EndSelect
Wend

sorry... i don't know how

good luck

8)

NEWHeader1.png

Link to comment
Share on other sites

I knew that one

now u'l know wat I wanted with reference 2 ur code

I wanted drag n drop in the list box GUICtrlCreateList without using the GUICtrlCreateInput box u provided below

the filename shud appear in that list box

I searched deeper into the forum but all the code uses

either input or edit box for drag n drop

I think this request should go to the developers in the next version

as I dont think it is possible with any of the commands in the

help file

Thank u very much for sparing time for me

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...