Jump to content

TAB and listviewitem not getting proper focus


Recommended Posts

; Tab items
Global Const $T_Event =        0
Global Const $T_Volunteer =    1

Global $MainForm = GUICreate($ProgName, $ProgWidth, $ProgHeight, (@DesktopWidth - $ProgWidth) / 2, (@DesktopHeight - $ProgHeight) / 2, $WS_SIZEBOX + $WS_SYSMENU )
GUISetState(@SW_HIDE)
GUISetBkColor(0xA6CAF0)
GUISetOnEvent($GUI_EVENT_CLOSE, "MainFormClose")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "")
GUISetOnEvent($GUI_EVENT_RESTORE, "")
;Local $TabVol = GUICtrlCreateTab(0, 32, 817, 593, BitOR($TCS_BUTTONS, $TCS_FOCUSONBUTTONDOWN, $TCS_FIXEDWIDTH))
Global $TabVol = GUICtrlCreateTab(1, $hTabs-$hToolbar, $ProgWidth-2, $hToolbar, $TCS_TABS)
GUICtrlSetFont(-1, 12, 400, 0, $L_ARIALBLACK)
;GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)

Global $TabSheetEvents = GUICtrlCreateTabItem($L_EVENTS)
Global $ListViewEvents = GUICtrlCreateListView( _
"Date |Type |From |To ", _
2, $hTabs, 815, $hLists-12, BitOr($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), $LVS_SORTDESCENDING)
GUICtrlSetFont(-1, 12, 400, 0, $L_MSSANSSERIF)
GUICtrlSetOnEvent(-1, "ListViewEventsClick")
;GUISetBkColor(0x00E0FFFF) ; will change background color
Global $ListEventsVol = GUICtrlCreateList("", 819, $hTabs, 202, 618)
GUICtrlSetFont(-1, 12, 400, 0, $L_MSSANSSERIF)
GUICtrlSetOnEvent(-1, "ListEventsVolClick")
EventFullList()

Global $TabSheetVolunteers = GUICtrlCreateTabItem($L_VOLUNTEERS)
Global $ListViewVolunteers = GUICtrlCreateListView( _
"Name |Type |Home |Work |Cell |Address |City |Prov|Postal|Notes ", _
2, $hTabs, $ProgWidth-4, $hLists, BitOr($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), $LVS_SORTASCENDING)
GUICtrlSetFont(-1, 12, 400, 0, $L_MSSANSSERIF)
GUICtrlSetOnEvent(-1, "ListViewVolunteersClick")
VolunteerFullList()

_GUICtrlTab_SetCurFocus($TabVol, $T_Event)
_GUICtrlTab_SetCurFocus($ListViewEvents, $T_Event)

I am creating 4 tabs (just showing 2 in code), and each has a ListView.

Problem is that after the second tab is created I set focus to first tab and this works except the listView is for the second tab.

How do I focus/refresh the first tab abd first listView?

----

Also, how can I force a minimum width on listView item colums so that the data is not cutoff or showing as "data ..."?

Edited by Garp99HasSpoken
Link to comment
Share on other sites

please post the full working code

Here

_GUICtrlTab_SetCurFocus($ListViewEvents, $T_Event)
$ListViewEvents is the controlID of the ListView not the Tab right ?

Regards :)

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

  • Moderators

Garp99HasSpoken,

Instant thought: - Are you properly closing the TabItem creation with GUICtrlCreateTabItem("") ? Not doing so can lead to what you describe. ;)

As to column widths: Look at _GUICtrlListView_SetColumnWidth - and there are also a couple of useful constants listed you can use to advantage. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Here is an example

#include <GUIConstantsEx.au3>
#include <GUITab.au3>
#include <GuiListView.au3>

Example()

Func Example()
Local $tab
Local $msg

$hGUi = GUICreate("My GUI Tab", 500, 600); will create a dialog box that when displayed is centered

;~ _GUICtrlTab_SetCurFocus($hTab, 1)
$tab = GUICtrlCreateTab(10, 10, 400, 500)

GUICtrlCreateTabItem("tab0")

$tab_Item = GUICtrlCreateTabItem("tab1")

$listview = GUICtrlCreateListView( '1|2', 15,40, 300, 200 )
$listviewItem = GUICtrlCreateListViewItem( "a|b", $listview )
GUICtrlCreateListViewItem( "c|d", $listview )
GUICtrlCreateListViewItem( "e|f", $listview )

GUICtrlCreateTabItem("tab2")

GUICtrlCreateTabItem("tab3")

GUICtrlCreateTabItem(""); end tabitem definition

$btn = GUICtrlCreateButton( "2Tab ListView First Item", 10, 520 )

GUISetState()

; Run the GUI until the dialog is closed
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $btn
_GUICtrlTab_ActivateTab( $tab, 1 ) ;_GUICtrlTab_SetCurFocus can pull back with $TCS_BUTTONS style
_GUICtrlListView_ClickItem(GUICtrlGetHandle($listview), 0) ;_GUICtrlListView_SetItemFocused will draw focus rectangle
EndSwitch

WEnd
EndFunc ;==>Example

Regards :)

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

;Autoit Options
; #NoTrayIcon ;No Tray Icon
Opt("GUIOnEventMode", 1)
Opt("WinTextMatchMode", 1) ;1=complete, 2=quick
Opt("WinTitleMatchMode", 3) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
Opt("GUICloseOnESC", 0) ;1=ESC closes, 0=ESC won't close
Opt("GUIResizeMode", 802)
; Opt("GUIResizeMode", 1)


#Include <String.au3>
#include <Date.au3>
#Include <WinAPI.au3>
#include <File.au3>
#include <GuiTab.au3>
;#include <GDIPlus.au3>
#include <GUIListBox.au3>
#include <GuiScrollBars.au3>
#include <GuiStatusBar.au3>
#include <GuiToolbar.au3>

; Constants includes
#include <ListViewConstants.au3>
#include <TabConstants.au3>
#include <ToolbarConstants.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <DateTimeConstants.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


; Tab groups
Global Const $L_VOLUNTEERS = " Volunteers "
Global Const $L_VOLUNTEER = "Volunteer"
Global Const $L_EVENTS = " Events "
Global Const $L_EVENT = "Event"
Global Const $L_FORMS = " Forms "
Global Const $L_FORM = "Form"
Global Const $L_LABELS = " Labels "
Global Const $L_LABEL = "Label"
Global Const $L_GLOBAL = "Global Options"

; Menus
Global Const $M_FILE = "&File"
Global Const $M_EDIT = "&Edit"
Global Const $M_EVENT = "Even&t"
Global Const $M_VOLUNTEER = "&Volunteer"
Global Const $M_OPTIONS = "&Go To..."

; Buttons
Global Const $L_OK = "&OK"
Global Const $L_DONE = "&Done"
Global Const $L_CANCEL = "&Cancel"
Global Const $L_ADD = "<< &Add"
Global Const $L_REMOVE = "&Remove >>"

; Prompts
Global Const $L_AREYOUSURE = "Are You Sure?"
Global Const $L_CANCELEXIT = "Cancel all changes and exit?"

; Tab items
Global Const $T_Event = 0
Global Const $T_Volunteer = 1
Global Const $T_Forms = 2
Global Const $T_Labels = 3

;Versions Info
Global $ProgName = "Volunteer Coordinator"
Global $VersionBuild = "20130213" ;YEAR|MON|DAY
Global $ProgVersion = "0.1"
GLOBAL $AboutVersion = "2013.02.13 (" & $ProgVersion & ")"

Global $ProgWidth =1024, $ProgHeight = 720

Local $sWidth = 400, $sHeight = 350
Local $hToolbar = 40, $hStatus = 40, $hTabs = $hToolbar+30, $hLists = ($ProgHeight - $hTabs - $hStatus - $hToolbar)

#Region ### START Koda GUI section ### Form=R:\AutoIt Examples\koda_2008-09-03\Forms\VolunteerCoordinator.kxf
Global $MainForm = GUICreate($ProgName, $ProgWidth, $ProgHeight, (@DesktopWidth - $ProgWidth) / 2, (@DesktopHeight - $ProgHeight) / 2, $WS_SIZEBOX + $WS_SYSMENU )
GUISetState(@SW_HIDE)
GUISetBkColor(0xA6CAF0)
GUISetOnEvent($GUI_EVENT_CLOSE, "MainFormClose")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "")
GUISetOnEvent($GUI_EVENT_RESTORE, "")
Global $TabVol = GUICtrlCreateTab(1, $hTabs-$hToolbar, $ProgWidth-2, $hToolbar, $TCS_TABS)
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)

Global $TabSheetEvents = GUICtrlCreateTabItem($L_EVENTS)
Global $ListViewEvents = GUICtrlCreateListView( _
"Date |Type |From |To ", _
2, $hTabs, 815, $hLists-12, BitOr($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), $LVS_SORTDESCENDING)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
;GUICtrlSetOnEvent(-1, "ListViewEventsClick")
Global $ListEventsVol = GUICtrlCreateList("", 819, $hTabs, 202, 618)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
;GUICtrlSetOnEvent(-1, "ListEventsVolClick")
; set EventFullList()

Global $TabSheetVolunteers = GUICtrlCreateTabItem($L_VOLUNTEERS)
Global $ListViewVolunteers = GUICtrlCreateListView( _
"Name |Type |Home |Work |Cell |Address |City |Prov|Postal|Notes ", _
2, $hTabs, $ProgWidth-4, $hLists, BitOr($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), $LVS_SORTASCENDING)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
;GUICtrlSetOnEvent(-1, "ListViewVolunteersClick")
;set VolunteerFullList()

Global $TabSheetForms = GUICtrlCreateTabItem($L_FORMS)
Global $ListViewForms = GUICtrlCreateListView( _
"Name |Style ", _
2, $hTabs, 600, $hLists, BitOr($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), $LVS_SORTASCENDING)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
;GUICtrlSetOnEvent(-1, "ListViewFormsClick")

Global $TabSheetLabels = GUICtrlCreateTabItem($L_LABELS)
GUICtrlSetState(-1,$GUI_SHOW)
Global $ListViewLabels = GUICtrlCreateListView( _
"Name |Style ", _
2, $hTabs, 600, $hLists, BitOr($LVS_SHOWSELALWAYS, $LVS_SINGLESEL), $LVS_SORTASCENDING)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
;GUICtrlSetOnEvent(-1, "TabVolChange")

GUICtrlCreateTabItem("") ;end of tabs
sleep(500)
_GUICtrlTab_SetCurFocus($TabVol, $T_Event)
; _GUICtrlTab_SetCurFocus($ListViewEvents, $T_Event)


;==> FILE menu
Local $MenuFile = GUICtrlCreateMenu($M_FILE)
Local $MenuFileOpen = GUICtrlCreateMenuItem("Open..." & @tab & "Ctrl+O", $MenuFile)
;GUICtrlSetOnEvent(-1, "MenuFileOpenClick")
Local $MenuFileSave = GUICtrlCreateMenuItem("Save" & @tab & "Ctrl+S", $MenuFile)
;GUICtrlSetOnEvent(-1, "MenuFileSaveClick")
Local $MenuFileSaveAs = GUICtrlCreateMenuItem("Save As..." & @tab & "F3", $MenuFile)
;GUICtrlSetOnEvent(-1, "MenuFileSaveAsClick")
Local $MenuFilePrint = GUICtrlCreateMenuItem("Print..." & @tab & "Ctrl+P", $MenuFile)
;GUICtrlSetOnEvent(-1, "MenuFilePrintClick")
Local $MenuFileExit = GUICtrlCreateMenuItem("Exit" & @tab & "Ctrl+E", $MenuFile)
;GUICtrlSetOnEvent(-1, "MenuFileExitClick")

;==> EDIT menu
Local $MenuEdit = GUICtrlCreateMenu($M_EDIT)
;Local $MenuEditCut = GUICtrlCreateMenuItem("Cut" & @tab & "Ctrl+X", $MenuEdit)
;GUICtrlSetOnEvent(-1, "MenuEditCutClick")
;Local $MenuEditCopy = GUICtrlCreateMenuItem("Copy" & @tab & "Ctrl+C", $MenuEdit)
;GUICtrlSetOnEvent(-1, "MenuEditCopyClick")
;Local $MenuEditPaste = GUICtrlCreateMenuItem("Paste" & @tab & "Ctrl+V", $MenuEdit)
;GUICtrlSetOnEvent(-1, "MenuEditPasteClick")
Local $MenuEditListItem = GUICtrlCreateMenuItem("Edit List Item" & @tab & "F2", $MenuEdit)
;GUICtrlSetOnEvent(-1, "MenuEditListItemClick")
Local $MenuGlobalOptions = GUICtrlCreateMenuItem($L_GLOBAL & @tab & "F4", $MenuEdit)
;GUICtrlSetOnEvent(-1, "MenuGlobalOptionsClick")

;==> EVENT menu
Local $MenuEvent = GUICtrlCreateMenu($M_EVENT)
Local $MenuEventAdd = GUICtrlCreateMenuItem("Add " & $L_EVENT & @tab & "F9", $MenuEvent)
;GUICtrlSetOnEvent(-1, "MenuEventAddClick")
Local $MenuEventEdit = GUICtrlCreateMenuItem("Edit " & $L_EVENT & @tab & "F10", $MenuEvent)
;GUICtrlSetOnEvent(-1, "MenuEventEditClick")
Local $MenuEventDelete = GUICtrlCreateMenuItem("Delete " & $L_EVENT & @tab & "", $MenuEvent)
;GUICtrlSetOnEvent(-1, "MenuEventDeleteClick")

;==> VOLUNTEER menu
Local $MenuVolunteer = GUICtrlCreateMenu($M_VOLUNTEER)
Local $MenuVolunteerAdd = GUICtrlCreateMenuItem("Add " & $L_VOLUNTEER & @tab & "F11", $MenuVolunteer)
;GUICtrlSetOnEvent(-1, "MenuVolunteerAddClick")
Local $MenuVolunteerEdit = GUICtrlCreateMenuItem("Edit " & $L_VOLUNTEER & @tab & "F12", $MenuVolunteer)
;GUICtrlSetOnEvent(-1, "MenuVolunteerEditClick")
Local $MenuVolunteerDelete = GUICtrlCreateMenuItem("Delete " & $L_VOLUNTEER & @tab & "", $MenuVolunteer)
;GUICtrlSetOnEvent(-1, "MenuVolunteerDeleteClick")

;==> OPTIONS menu
Local $MenuOptions = GUICtrlCreateMenu($M_OPTIONS)
Local $MenuEventDates = GUICtrlCreateMenuItem($L_EVENT & " Dates" & @tab & "F5", $MenuOptions)
;GUICtrlSetOnEvent(-1, "MenuEventDatesClick")
Local $MenuVolList = GUICtrlCreateMenuItem($L_VOLUNTEER & " List" & @tab & "F6", $MenuOptions)
;GUICtrlSetOnEvent(-1, "MenuVolListClick")
Local $MenuForms = GUICtrlCreateMenuItem("Forms" & @tab & "F7", $MenuOptions)
;GUICtrlSetOnEvent(-1, "MenuFormsClick")
Local $MenuLabels = GUICtrlCreateMenuItem("Labels" & @tab & "F8", $MenuOptions)
;GUICtrlSetOnEvent(-1, "MenuLabelsClick")

;==> HELP menu
Local $MenuHelp = GUICtrlCreateMenu("Help")
;GUICtrlSetOnEvent(-1, "MenuHelpClick")
Local $MenuHelpAbout = GUICtrlCreateMenuItem("About" & @tab & "F1", $MenuHelp)
;GUICtrlSetOnEvent(-1, "MenuHelpAboutClick")


; MENU hotkeys
;Local $MainForm_AccelTable[3][2] = [ ["^x", $MenuEditCut],["^c", $MenuEditCopy],["^v", $MenuEditPaste] ]
Local $MainForm_AccelTable[22][2] = [ _
["^!f", $MenuFile],["^o", $MenuFileOpen],["^s", $MenuFileSave],["{F3}", $MenuFileSaveAs],["^p", $MenuFilePrint], ["^e", $MenuFileExit], _
["^!e", $MenuEdit],["{F2}", $MenuEditListItem],["{F4}", $MenuGlobalOptions], _
["^!t", $MenuEvent],["{F9}", $MenuEventAdd],["{F10}", $MenuEventEdit], _
["^!v", $MenuVolunteer],["{F11}", $MenuVolunteerAdd],["{F12}", $MenuVolunteerEdit], _
["^!g", $MenuOptions],["{F5}", $MenuEventDates],["{F6}", $MenuVolList],["{F7}", $MenuForms],["{F8}", $MenuLabels], _
["^!h", $MenuHelp],["{F1}", $MenuHelpAbout] _
]
GUISetAccelerators($MainForm_AccelTable, $MainForm)


Global $ToolBar = _GUICtrlToolbar_Create($MainForm, 0)
_GUICtrlToolbar_AddButton($ToolBar, 0, 0)
_GUICtrlToolbar_AddButton($ToolBar, 0, 1)
_GUICtrlToolbar_AddButton($ToolBar, 0, 2)
_GUICtrlToolbar_AddButton($ToolBar, 0, 3)
_GUICtrlToolbar_AddButton($ToolBar, 0, 4)
_GUICtrlToolbar_AddButton($ToolBar, 0, 5)

Global $StatusBar = _GUICtrlStatusBar_Create($MainForm)
_GUICtrlStatusBar_SetSimple($StatusBar)
_GUICtrlStatusBar_SetText($StatusBar, "Simple status bar window text goes here.")
_GUICtrlStatusBar_SetMinHeight($StatusBar, $hStatus)

GUISetFont(10, 400, 0, "MS Sans Serif", $MainForm)
GUISetOnEvent($GUI_EVENT_CLOSE, "MainFormClose")
;GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, '_PRIMARYdown')
GUISetOnEvent($GUI_EVENT_RESTORE, "")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "")
GUISetOnEvent($GUI_EVENT_RESIZED, "")

#EndRegion ### END Koda GUI section ###

GUISwitch($MainForm)
GUISetState(@SW_SHOW)

;GUISetState(@SW_SHOW, $MainForm)
While 1
If (GUIGetMsg() = $GUI_EVENT_CLOSE) Then ExitLoop
WEnd

GUISetState(@SW_HIDE)
GUIDelete()
Exit

Func MainFormClose()
Exit
EndFunc ;==>MainFormClose

Working example -- removed unnecessary onEvent functions.

Edited by Garp99HasSpoken
Link to comment
Share on other sites

  • Moderators

Garp99HasSpoken,

If I add the following after the GUISetState line I get the correct tabs in focus with the correct ListViews displayed - do you? :huh:

Sleep(1000)
GUICtrlSetState($TabSheetVolunteers, $GUI_SHOW)
Sleep(1000)
GUICtrlSetState($TabSheetForms, $GUI_SHOW)
Sleep(1000)
GUICtrlSetState($TabSheetLabels, $GUI_SHOW)
Sleep(1000)
GUICtrlSetState($TabSheetEvents, $GUI_SHOW)

That is how the Help file suggests you set focus to a TabItem. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Ok, here is what i understand

How do I focus/refresh the first tab and first listView?

_GUICtrlListView_ClickItem(GUICtrlGetHandle($listview), 0) ;_GUICtrlListView_SetItemFocused will draw focus rectangle

how can I force a minimum width on listView item colums?

M23 has already answered this,

_GUICtrlListView_SetColumnWidth

Does it help ?

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

Yes,

GUICtrlSetState($TabSheetEvents, $GUI_SHOW)

is what was missing to make it work.

And I took a look at _GUICtrlListView_SetColumnWidth() and got it working with

_GUICtrlListView_SetColumnWidth($ListViewEvents, 0, $LVSCW_AUTOSIZE_USEHEADER )

_GUICtrlListView_SetColumnWidth($ListViewEvents, 1, $LVSCW_AUTOSIZE_USEHEADER )

Thanks for the help.

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...