Sign in to follow this  
Followers 0
Steveiwonder

ListView styling help

7 posts in this topic

#1 ·  Posted (edited)

Hi all,

I'm trying to create a list view that looks like this but failing everytime, i can't find the right styles etc...

Posted Image

Here is what i have...

#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>

Global $ListView, $Form1

$Form1 = GUICreate("Update in progress", 633, 350, 192, 124)
$ListView = GUICtrlCreateListView("121", 104, 80, 353, 200, $ListView)

For $i = 0 to 40 Step +1
    GUICtrlCreateListViewItem("This is item " & $i, $ListView)
Next

GUISetState(@SW_SHOW)
sleep(3000)
Exit

(Example code, not real project)

I have tried different combination of styles without any luck.

Thanks in advance, S

Edited by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites



Hi Steveiwonder.

In picture this is not a Listview.

This is EditBOX+ on bottom of EDITBOX progress Bar.

So,as result you need check autoit help file for

GUICtrlCreateEdit()

and for

GUICtrlCreateProgress()

Hope this helps to you.


[size="5"] [/size]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Changing your listview to a list looks more like the pic

#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>

Global $ListView, $Form1

$Form1 = GUICreate("Update in progress", 633, 350, 192, 124)
$ListView = GUICtrlCreateList("121", 104, 80, 353, 200, $WS_VSCROLL)

For $i = 0 to 40 Step +1
    GUICtrlSetData(-1,"This is item " & $i)
Next

GUISetState(@SW_SHOW)
sleep(3000)
Exit
Edited by Yoriz

GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks gonna take a look

@ Sh3llC043r - Hrmm When i use autoit window info tool it shows "Sys32ListView" ?

Edited by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Changing your listview to a list looks more like the pic

#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>

Global $ListView, $Form1

$Form1 = GUICreate("Update in progress", 633, 350, 192, 124)
$ListView = GUICtrlCreateList("121", 104, 80, 353, 200, $WS_VSCROLL)

For $i = 0 to 40 Step +1
    GUICtrlSetData(-1,"This is item " & $i)
Next

GUISetState(@SW_SHOW)
sleep(3000)
Exit

This is closer yes, i can use "$LBS_NOSEL" to remove selection but i still have a dotted gray outline round each one.

Can i remove this ?

Anyone from AutoIt able to comment if this is a custom install and how did you make it?

Edited by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites

Even when trying to use an edit i have problems, the user shouldn't be able to select anything... there is also a flashing mouse cursor.

Anyone got an idea?


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I have used this instead... which seems to be better...

However how do i add scrolling or autoscrolling to a _GUICtrlListView_Create?

#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)



Global $hListView

_Main()

Func _Main()

    Local $GUI
    $GUI = GUICreate("(UDF Created) ListView Create", 400, 300)

    $hListView = _GUICtrlListView_Create($GUI, "", 2, 2, 394, 268, $LVS_NOCOLUMNHEADER + $LVS_LIST+ $WS_VSCROLL)
    GUISetState()

_GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 100)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)



    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main

Anyone have any idea?

Edited by Steveiwonder

They call me MrRegExpMan

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