Re: Ownerdraw listview
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
$ItemCount = ControlListView
('Test', '', 'SysListView321', 'GetItemCount')
uses absolute Larry's method of getting content from any windows, I
think. Current window of script has title 'Test' but it can be other
titles and text. See about it in Doc.
Valery
--- In [email protected], louvetpatrick <no_reply@...>
wrote:
>
> --- In [email protected], "valery_vi" <shehrer1@> wrote:
> >
> > Maybe it can be useful for you:
> >
> > #include <GUIConstants.au3>
> > Const $LBS_OWNERDRAWFIXED = 10
> > Const $LBS_OWNERDRAWVARIABLE = 20
> > Const $LBS_HASSTRINGS = 40
> >
> >
> > $hGUI = GUICreate("Test", 400, 300)
> >
> > $lv = GUICtrlCreateListView("Programs", 0, 0, 135, 300)
> > GUICtrlSetStyle(-1, BitOr($LBS_OWNERDRAWFIXED, $LBS_HASSTRINGS))
> > GUICtrlSetBkColor(-1, -1)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUICtrlCreateListViewItem('Happy New Year!', $lv)
> > GUISetState()
> > $get = GUICtrlCreateButton("Get count of Listview Items", 150,
10,
> > 200, 30)
> >
> > While 1
> > $Msg = GUIGetMsg()
> > Switch $Msg
> > Case $GUI_EVENT_CLOSE
> > ExitLoop
> > Case $get
> > $ItemCount = ControlListView
> > ( 'Test', '', 'SysListView321', 'GetItemCount')
> > Msgbox(0,'','$ItemCount = ' & $ItemCount)
> > EndSwitch
> > WEnd
> >
> >
> > Valery
> >
> > --- In [email protected], louvetpatrick <no_reply@>
> > wrote:
> > >
> > > Can anyone help me to solve tis problem. I want to read the
items
> > of a
> > > control created with the $LBS_OWNERDRAWFIXED style. The
control
> > would
> > > need the $LBS_HASSTRINGS style in order to read the text.
> > > Thanks
> > >
> >Thanks valery,
> But my problem is with a listbox creating by another programm not
by
> autoit3
>