Sign in to follow this  
Followers 0
ljarutten

Resize GuiCtrlCreateListView

5 posts in this topic

Hi There,

Does someone know if the size can be changed from GuiCtrlCreateListView when I click on a button ?

I am searching for days now and I can't find it. ;)

Thanks in Advance !!! :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi There,

Does someone know if the size can be changed from GuiCtrlCreateListView when I click on a button ?

I am searching for days now and I can't find it. ;)

Thanks in Advance !!! :)

#Include <GuiListView.au3>
_GUICtrlListViewSetColumnWidth (  $h_listview, $i_col, $i_width )

I'm not sure if you mean the columns or the actual size?

EDIT: Spelling

Edited by Bert

Share this post


Link to post
Share on other sites

#Include <GuiListView.au3>
_GUICtrlListViewSetColumnWidth (  $h_listview, $i_col, $i_width )

I'm not sure if you mean the columns or the actual size?

EDIT: Spelling

Thanks for your awnser, but I do not mean the columns size but the actual size of the controll

Share this post


Link to post
Share on other sites

Hi,

#include <GUIConstants.au3>

Global $state

$Gui = GUICreate("listview resize", 220, 200)
$listview = GUICtrlCreateListView ("col1  |col2|col3  ", 10, 10, 200, 150)
$button = GUICtrlCreateButton ("Resize",75,170,70,20)
GUICtrlCreateListViewItem("item2|col22|col23",$listview)
GUISetState()

While 1
    $msg = GUIGetMsg ()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            If Not $state Then
                $state = 1
                ControlMove($Gui, "", $listview, 40, 40, 140, 100)
            Else
                $state = 0
                ControlMove($Gui, "", $listview, 10, 10, 200, 150)
            EndIf   
    EndSelect
WEnd
Cheers

Share this post


Link to post
Share on other sites

Hi,

#include <GUIConstants.au3>

Global $state

$Gui = GUICreate("listview resize", 220, 200)
$listview = GUICtrlCreateListView ("col1  |col2|col3  ", 10, 10, 200, 150)
$button = GUICtrlCreateButton ("Resize",75,170,70,20)
GUICtrlCreateListViewItem("item2|col22|col23",$listview)
GUISetState()

While 1
    $msg = GUIGetMsg ()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            If Not $state Then
                $state = 1
                ControlMove($Gui, "", $listview, 40, 40, 140, 100)
            Else
                $state = 0
                ControlMove($Gui, "", $listview, 10, 10, 200, 150)
            EndIf   
    EndSelect
WEnd
Cheers
Thanks u are the greatest :)

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