|
From: John L. <jla...@gm...> - 2007-07-30 15:19:52
|
On 7/30/07, Attila <ejj...@gm...> wrote:
> I feel I am close, but still dont know.
> Code:
> dialog:Connect(tTextBoxes.wxID_TXT_FILTER,wx.wxEVT_COMMAND_TEXT_UPDATED,
> function(event)
> --tTextBoxes["txt_filter"]:GetValue()
> for i = 0,tListBoxes["lst_reghubs"]:GetItemCount() - 1 do
> for idx = 0,tListBoxes["lst_reghubs"]:GetColumnCount() - 1 do
> local listItem = wx.wxListItem()
> listItem:SetId(i)
> listItem:SetMask(wx.wxLIST_MASK_TEXT)
> tListBoxes["lst_reghubs"]:GetColumn(idx, listItem)
> wx.wxMessageBox(listItem:GetText())
> end
> end
> end)
> Now it writes the columnnames so many times the many elements are in the
> ListCtrl. What I want is the column values for each element. I've read
> through the manual many times, but I still don't understand. By the way,
> thanks for the fast reply.
Ok, this is tested.
local li = wx.wxListItem()
li:SetId(#row)
li:SetColumn(#col)
li:SetMask(wx.wxLIST_MASK_TEXT)
listCtrl:GetItem(li)
print(li:GetText())
Hope this helps,
John Labenski
ps. If you use wxLuaEditor you can use print() statements and also use
the "output" window to get at variables in your program to try things
by hand. If you use wxLua.exe you can use the -c switch to get a
console to display the output instead of using a wxMessageBox.
|