Jump to content

Recommended Posts

Posted

Hello,

I've got this questions regarding GuiCtrlCreateListViewItem and GUICtrlCreateTreeViewItem. I want them to be combined. That means that they are exactly the same font size etc and when i choose one thing from GuiCtrlCreateListViewItem corresponding field in GUICtrlCreateTreeViewItem gets highlighted too. So if i go down with scroller both Views go down at same time. Same for going up etc. Is it possible? So far setting same font size, font for both Views gives diffrent stuff?!

GUICtrlSetFont($GUI_ServersView, 10, 400, 0, "Tahoma")

GUICtrlSetFont($GUI_ListView, 10, 400, 0, "Tahoma")

Hope someone can help me with this or propose some better way for doing that (keep in mind that i will be loading unknown number of entries from .ini file that's why i use views and not Labels.

#include <GUIConstants.au3>
#include <GuiListView.au3>
#include <GuiList.au3>
$GUI_MAIN = GUICreate("TEST", 800, 600)
Dim $GUI_Group[10], $GUI_ListView_Item[14], $server_locations_treeview[14]

$GUI_Group[1] = GUICtrlCreateGroup("Servers information", 5, 5, 790, 325)
$GUI_ServersView = GUICtrlCreateTreeView(15, 45, 175, 250, BitOR($TVS_CHECKBOXES, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
$GUI_ListView = GUICtrlCreateListView("Current task | Ping time | Another field  ", 200, 25, 400, 270);,$LVS_SORTDESCENDING)
GUICtrlSetFont($GUI_ServersView, 10, 400, 0, "Tahoma")
GUICtrlSetFont($GUI_ListView, 10, 400, 0, "Tahoma")
GUISetState(@SW_SHOW, $GUI_MAIN)

$GUI_ListView_Item[1]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[2]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[3]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[4]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[5]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[6]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[7]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[8]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[9]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[10]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[11]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)
$GUI_ListView_Item[12]= GuiCtrlCreateListViewItem("Idling! | 50ms" ,$GUI_ListView)

$server_locations_treeview[1] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[2] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[3] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[4] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[5] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[6] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[7] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[8] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[9] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[10] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[11] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
$server_locations_treeview[12] = GUICtrlCreateTreeViewItem("Server", $GUI_ServersView)
While 1
 Sleep(10000)
WEnd

Thanks,

MadBoy

My little company: Evotec (PL version: Evotec)

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