wxListView(3)
π wxListView π
okay bestie, so this is the wxListView(3) page β an Erlang module definition, and it's giving "the user-friendly bestie of a chaotic class" energy. Come sit with me, we're gonna go through it together π«Ά
β¨ NAME β¨
wxListView β this class currently simply presents a simpler to use interface for the wxListCtrl -- it can be thought of as a faΓ§ade for that complicated class. π
πΈ DESCRIPTION πΈ
Using it is preferable to using wxListCtrl directly whenever possible, because in the future some ports might implement wxListView but not the full set of wxListCtrl features. so likeβ¦ future-proofing, bestie, it's the move β¨
Other than the different interface, this class is identical to wxListCtrl. In particular, it uses the same events, same window styles and so on. same vibe, different wrapping paper π
See: setColumnImage/3
This class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
so it's got that whole ancestry thing going on, generational talent ngl π
wxWidgets docs: wxListView
π¦ DATA TYPES π¦
wxListView()::wx:wx_object().
that's it. one type. minimal. iconic. periodt π
π FUNCTIONS π
clearColumnImage(This, Col) -> ok
clearColumnImage(This, Col) -> ok
when This :: wxListView(), Col :: integer().
Resets the column image β after calling this function, no image will be shown. it's the "and what" button bestie, poof, gone π
See: setColumnImage/3
focus(This, Index) -> ok
focus(This, Index) -> ok
when This :: wxListView(), Index :: integer().
Sets focus to the item with the given index. giving that item main character energy, as it should π
getFirstSelected(This) -> integer()
getFirstSelected(This) -> integer() when This :: wxListView().
Returns the first selected item in a (presumably) multiple selection control. π₯
Together with getNextSelected/2 it can be used to iterate over all selected items in the control.
Return: The first selected item, if any, -1 otherwise.
getFocusedItem(This) -> integer()
getFocusedItem(This) -> integer() when This :: wxListView().
Returns the currently focused item or -1 if none. lowkey rude that it can be none, but okay π
See:
isSelected/2focus/2
getNextSelected(This, Item) -> integer()
getNextSelected(This, Item) -> integer()
when This :: wxListView(), Item :: integer().
Used together with getFirstSelected/1 to iterate over all selected items in the control. it's giving buddy system, and honestly? slay π€
Return: Returns the next selected item or -1 if there are no more of them.
isSelected(This, Index) -> boolean()
isSelected(This, Index) -> boolean()
when This :: wxListView(), Index :: integer().
Returns true if the item with the given index is selected, false otherwise. vibe check for a single row, exactly what it says on the tin β
See:
getFirstSelected/1getNextSelected/2
select(This, N, [Option]) -> ok
select(This, N, [Option]) -> ok
when
This :: wxListView(),
N :: integer(),
Option :: {on, boolean()}.
Selects or unselects the given item.
the options situation:
{on, boolean()}β flips the item at indexNselected (true) or unselected (false).
β οΈ NOTICE, BESTIE, PAY ATTENTION: this method inherits the unusual behaviour ofwxListCtrl:setItemState/4which sends awxEVT_LIST_ITEM_SELECTEDevent when it is used to select an item, contrary to the usual rule that only the user actions result in selection. so like, you calling it programmatically still fires the event, no cap. the rules are different here π
setColumnImage(This, Col, Image) -> ok
setColumnImage(This, Col, Image) -> ok
when
This :: wxListView(),
Col :: integer(),
Image :: integer().
Sets the column image for the specified column. cute header decoration moment π
To use the column images, the control must have a valid image list with at least one image. no image list, no image, that's just how it is fr fr β
π‘ asides and cross-refs live in setColumnImage/3 β that's the one to poke at if you wanna know more about the column image shenanigans.
and that's the whole page, bestie, you ate it π β¨
later, legend β this was Ericsson AB, from wx 2.6, on the wxListView(3) page π«Άππ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms