Jump to content

Creating a hidden field in ListView box


Go to solution Solved by Jewtus,

Recommended Posts

Posted

Is there any way to create a hidden field in a list view?

This is what I already have for the list view:

$HitsView = GUICtrlCreateListView("", 472, 280, 420, 152,Default,0x00000004)
    _GUICtrlListView_InsertColumn($HitsView, 0, "Search Type", 75)
    _GUICtrlListView_InsertColumn($HitsView, 1, "ID", 100)
    _GUICtrlListView_InsertColumn($HitsView, 2, "Name", 100)
    _GUICtrlListView_InsertColumn($HitsView, 3, "Date", 100)
    _GUICtrlListView_InsertColumn($HitsView, 4, "Notes", 100)
    _GUICtrlListView_InsertColumn($HitsView, 5, "Hidden", 0)

I was hoping that setting the size to 0 would hide it, but it does not.

Any suggestions?

Posted (edited)

Works fine for me..

#include <GUIListView.au3>
#include <GUIConstantsEx.au3>

Local $hGUI, $msg, $HitsView

$hGUI = GUICreate("hi", 800)
GUISetState()


$HitsView = GUICtrlCreateListView("", 0, 0, 700, 152,Default,0x00000004)
    _GUICtrlListView_InsertColumn($HitsView, 0, "Search Type", 75)
    _GUICtrlListView_InsertColumn($HitsView, 1, "ID", 100)
    _GUICtrlListView_InsertColumn($HitsView, 2, "Name", 100)
    _GUICtrlListView_InsertColumn($HitsView, 3, "Date", 100)
    _GUICtrlListView_InsertColumn($HitsView, 4, "Notes", 100)
    _GUICtrlListView_InsertColumn($HitsView, 5, "Hidden", 0)



While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

proof:

post-86910-0-20561500-1413826497_thumb.p

Edited by MikahS

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

  • Solution
Posted

Ok, So I figured out whats going on. Its when I insert data that the column resizes.

I added 

GUICtrlCreateListViewItem("This|Is|A|Test|Right| ", $HitsView)

and the column shows up. Because there is data in the last column, I used _GUICtrlListView_SetColumnWidth($HitsView,5,0) and that seems to have fixed the issue.

Posted

Glad you found a solution to your needs. :)

Snips & Scripts

  Reveal hidden contents

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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
  • Recently Browsing   0 members

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