Jump to content

Resize GuiCtrlCreateListView


ljarutten
 Share

Recommended Posts

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

Link to comment
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 :)
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...