Displaying 20 results from an estimated 1000 matches similar to: "TRW: getters and setters"
2004 May 24
9
Combo Box
>> You really want to call get_value. Unfortunately, that''s not
implemented
>> in wxRuby 0.3.0.
>I found to my surprise that this method is actually working, but only
in the
>example code that comes with wxRuby one-click install for Windows.
@combo.get_label seems to work for me.
See sample code below.
HTH,
Assaph
----- CODE -----
require ''wxruby''
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
2004 Jan 15
10
Wx::ListCtrl#get_item method
Hi guys!
I have a question (or a request?) on Wx::ListCtrl#get_item method.
As you can see in the wxWindows reference, wxListCtrl::GetItem method of
C++ is different from that of wxPython.
C++
return value: boolean
argument: wxListItem& info
wxPython
return value: wxListItem
arguments: int ID, int column (optional)
How about wxruby?
>From the wxruby source code, wxruby looks
2004 Apr 21
2
Resizing a ListCtrl
Hi Guys,
I''m having serious troubles resizing a dialog with a ListCtrl. The ctrl
will not resize horizontally no matter what I''m doing. I''ve attached a
sample code below. Any help will be greatly appreciated, as I really
like wxRuby :)
I''ve also tried to copy from the example from listtest.rbw, but that
also doesn''t seem to work.
Another thing
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
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
2004 Jun 02
13
wxGrid Question
When operating with a wxGrid is there a way to get a reference to the
TextCtrl field that is created when you start typing in a cell.
Also is there a way to get mouse events to work with a wxGrid, so far I
can''t get any of them to work. I had tried various combo''s of:
@grid.evt_left_down(){ |event|
puts "Left mouse is down"; }
using evt_left_down, evt_left_up,
2009 Oct 24
6
Working with ListCtrl and ListItem
Hi List,
I''m trying to get my ListCtrl to work. Currently I''ve managed to fill
my ListCtrl with items, but I think it''s not the most beautiful way:
class MyList < Wx::ListCtrl
def initialize(parent, *args)
super(parent, :style => Wx::LC_REPORT|LC_HRULES )
create_layout
fill_list
end
def create_layout
self.insert_column(0, "Name")
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 list
2015 Nov 20
1
Good practice for naming classes, builders, attributes, getters/setters for object composition
Hey everyone,
I am developing a package and I am wondering if there is a good practice
for naming classes, builders, attributes getters and setters when dealing
with object composition. I know that it is usually a good practice to give
to the builder the same name as the class and, if possible, to avoid to use
upper case letters. My problem is that, when I build an object containing
an other
2006 Apr 03
7
Getters and setters problem?
Hi list,
first evening of playing with rails, so please forgive me if I ask
something stupid. ;-)
I created a User model and tried to use ActiveRecord callbacks to
convert the password to sha1 just before saving it. For some reason
postgresql gives me a error because the given password is null. To
test even further I tried to change :login too, same error happens,
:login is empty too.
I am sure
2006 Aug 18
10
TreeCtrl update
The previous TreeCtrl.i was very messy and just plain wrong, for
instance it had GetFirstChild as depreciated when in fact only 1
version of it was depreciated not both.
I changed GetFirstChild and GetNextChild to return an array of values
to match the wxPython and wxPerl usage.
I also noticed that wxTreeCtrl is inherited from wxControl on Windows
and wxScrolledWindow on everything else so I #if
2004 Jun 19
4
FlexGridSizer question
=begin
I am trying to understand how FlexGridSizer works and I have written a small
test application using the latest wxRuby 0.4.0 on Win XP (Home).
I cannot get static text ''Week'', ''Day'' and ''Date'' line up above the OK button.
I have tried all combinations of ALIGN flags, but I either got the text sticking
far too close to the left edge of
2006 Nov 15
0
[740] trunk/wxruby2: API - Make ListCtrl#get_item return a ListCtrl item corresponding to a row and
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Feb 07
3
ActiveRecord for kirbybase?
I''ve found vague mentions of various attempts at creating an ActiveRecord adapter for the KirbyBase pure Ruby DBMS, but
nothing which looks like it''s actually working. Anyone know of such an adapter that is functional and available?
b
2006 Mar 24
9
Escaping characters
Hi,
I am writing some help about post formatting. I am using redcloth to
format the text, and in a FAQ, also formatted with redcloth, I explain
what to type to what to obtain.
So, how could I escape ''*'', ''#'' & Co, to have an output like
<redcloth>
Type *word* to obtain <strong>word</strong>
</redcloth>
I tried "Type
2004 Aug 25
7
problem subclassing Wx::Menu
Hi folks
I''m trying to make a class to make Wx::Menu easier for me to use and
hide the constants and event-binding complexity.
I''ve created a subclass of Wx::Menu, but whether I create my own
append() method and call super(), or create a differently-named method
and called append() from it, it seems to segfault. Sample attached, see
line 20. Am I doing something stupid?
2006 Mar 02
5
Instiki and SQL Server??
Hello. I reeeeally want to get Instiki running at my day job, but they
are Microsoft-heads. While I can probably sell them on trying Rails,
they are definitely going to want the database to sit in our SQL Server
instance with our other databases. I can''t get instiki to create the
tables in sql server though (I''ve added ADO.rb, and gotten a
connection). When I run the
2006 Nov 12
1
TreeCtrl item_data
The attached fixes set_item_data, get_item_data and some other methods
for the TreeCtrl so they work nicely with Ruby objects and GC.
In C++ Wx TreeCtrl item_data works differently from client_data in
classes derived from ControlWithItems (eg Choice, ListCtrl). A
one-to-one mapping of the way TreeCtrl works would mean that you would
have to derive a class from TreeItemData, and instantiate
2006 Jun 16
6
rendering mathematical equations
Any recommendations on how I can get mathematical equations into my
resulting html? (Besides using x^2^ type markup.)
I figure I could parse out equation text from my main text before
RedCloth ever sees it... and then maybe create png''s somehow from it,
putting the links to them back into the main text before handing it
over to RC. But I don''t know of a util that will generate