search for: set_item

Displaying 12 results from an estimated 12 matches for "set_item".

Did you mean: get_item
2008 Oct 17
3
ListCtrl loading data
Hi all, I''m using a ListCtrl on LC_REPORT mode. using set_item(index, col, ''value'') the list does''t get populated. Is it a bug? which is the method to call? i''m using ruby 1.8.6 wxruby 1.9.8 mswin32 on winXP attached is an example. thank you. bio. _______________________________________________ wxruby-users mailing...
2009 Sep 05
5
Filling Wx::ListCtrl with contents
Hi all, I''ve got a question concerning ListCtrl_virtual of wxRuby since I see no way filling the list with dynamic contents. I''m new to Ruby so I maybe have to apologise for my request. The problem is, that I have to define the on_get_item_text(item, col) function. There I would like to use the item and col variables to read data from a two-dimensional array. My very problem
2009 Oct 24
6
Working with ListCtrl and ListItem
...lf.insert_column(1, "Code") self.insert_column(2, "Desc") self.set_column_width(0,80) self.set_column_width(1,100) self.set_column_width(2,150) end def fill_list i=0 DataObject.find(:all).each do |data| self.insert_item(i, data.name) self.set_item(i,1,data.code) self.set_item(i,2,data.description) i = i + 1 end end I think it would be better to subclass Wx::ListItem and add instances of this class to the List. Something like this (not tested): class MyListItem < Wx::ListItem def initialize(data_object, *args)...
2007 Aug 27
3
Problem with ListCtrl#get_item
Hello, I have a problem with getting items from ListCtrl. Although my ListCtrl is in LC_REPORT mode, it has columns set up, every cell is set with set_item and everything displays fine, this code: x = myList.get_item(row,col).get_text() always returns an empty string. For example: myList.set_item(0,0,"Hello") x = myList.get_item(0,0).get_text() now x equals "" ! I don''t know whether it is a bug in wxRuby or I'...
2004 Apr 21
2
Resizing a ListCtrl
...uot;Col 1", LIST_FORMAT_LEFT) @fileList.insert_column(1, "col 2", LIST_FORMAT_LEFT) @fileList.insert_column(2, "col 3", LIST_FORMAT_LEFT, 1000) item = ListItem.new item.set_column(0) 20.times { |i| idx = @fileList.insert_item(item) @fileList.set_item(idx, 0, i.to_s * i) @fileList.set_item(idx, 1, i.to_s * i) @fileList.set_item(idx, 2, i.to_s * i) } @fileList.set_column_width(0, LIST_AUTOSIZE_USEHEADER) @fileList.set_column_width(1, LIST_AUTOSIZE_USEHEADER) @fileList.set_column_width(2, LIST_AUTOSIZE_USEHEADER)...
2006 Mar 28
3
ListItem patches
Hi Attached, patches to implement ListItem. This class, in wxruby 0.6.0, allows styling of individual items in a ListCtrl, via a particularly clunky API. In disambiguating the overloaded ListCtrl#set_item method it introduces one non backwards-compatible change. I''ve followed the WxPython convention as described in the Wx class ref, renaming set_item(index, col, string, imageid) to set_item_string. One thing that doesn''t work is the constants LIST_FORMAT_LEFT etc. I''m not...
2006 Nov 15
0
[740] trunk/wxruby2: API - Make ListCtrl#get_item return a ListCtrl item corresponding to a row and
...tem% info) </del><ins>+ "ListItem":listitem.html *get_item*(%(arg-type)Integer% row, + %(arg-type)Integer% col = -1) </ins><span class="cx"> </span><del>-Gets information about the item. See "ListCtrl#set_item":listctrl.html#ListCtrl_setitem for more -information. </del><ins>+Gets information, such as the text label, font and colour, about a +ListCtrl item at zero-based row number @row@. The @col@ parameter is +optional, and is only meaningful if the ListCtrl was created with the +style...
2011 Aug 08
0
[PATCH] check admin password for upgrade verification
...rt-config-installer.py index 637c64c..7c66676 100644 --- a/scripts/ovirt-config-installer.py +++ b/scripts/ovirt-config-installer.py @@ -177,7 +177,7 @@ class NodeInstallScreen: def current_password_callback(self): auth = PAM.pam() auth.start("passwd") - auth.set_item(PAM.PAM_USER, "root") + auth.set_item(PAM.PAM_USER, "admin") global current_password current_password = self.current_password.value() auth.set_item(PAM.PAM_CONV, pam_conv) @@ -590,7 +590,7 @@ class NodeInstallScreen: self.root_password_...
2004 Apr 26
7
TRW: getters and setters
Hi all, I mentioned this on the forum but wasn''t sure if anyone was paying attention. I was just wondering if it would be possible to replace the get_something/set_something style methods with the more Rubyish something/something= style (i.e. uniform access). For example, the Button class currently has button.get_label and button.set_label("foo"). It would give me warm,
2007 Jun 05
0
[1050] trunk/wxruby2/doc/textile: Delete doc references to remove assign_image_list methods in Tree/ListCtrl
...d). </span><del>- -This method does not take ownership of the image list, you have to -delete it yourself. - -h4. See also - -"ListCtrl#assign_image_list":listctrl.html#ListCtrl_assignimagelist - - - </del><span class="cx"> h3(#ListCtrl_setitem). ListCtrl#set_item </span><span class="cx"> </span><span class="cx"> Integer *set_item*(%(arg-type)Integer% index, %(arg-type)Integer% col, </span></span></pre></div> <a id="trunkwxruby2doctextiletreectrltxtl"></a> <div c...
2013 Jan 06
1
[PATCH] menugen: Make it compatible with Py3k
...menu item is declared" + print("Error before line %d" % self.lineno) + print("REASON: menu must be declared before a menu item is declared") sys.exit(1) self.menus[-1][1].append(self.entry) self.init_entry() def set_item(self,name,value): - if not self.entry.has_key(name): + if name not in self.entry: msg = ["Unknown attribute %s in line %d" % (name,self.lineno)] msg.append("REASON: Attribute must be one of %s" % self.vattrs) return "\n".joi...
2006 Jun 30
6
RSS::Parser Documentation
Hi I am trying to use the RSS classes from "rss/2.0" and everything works but I want to know what attributes and properties I can get at from each of the classes I am getting back. For example, the class has a "channel" which I can tell has a "title" attribute (because it works when I query it :) but I would really like a list of every attribute that is