nobody at rubyforge.org
2006-Oct-17 18:47 UTC
[Wxruby-development] [681] trunk/wxruby2/samples/treectrl/treectrl.rb: wxMAC does not like menu id''s of 0 so I fixed that also made set_item_text_colour
<!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: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:'':'';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family:
verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;
font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding:
6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid;
padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family:
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch
.binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[681] trunk/wxruby2/samples/treectrl/treectrl.rb: wxMAC does not
like menu id''s of 0 so I fixed that also made set_item_text_colour
</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>681</dd>
<dt>Author</dt> <dd>seanlong</dd>
<dt>Date</dt> <dd>2006-10-17 14:47:27 -0400 (Tue, 17 Oct
2006)</dd>
</dl>
<h3>Log Message</h3>
<pre>wxMAC does not like menu id''s of 0 so I fixed that also made
set_item_text_colour
and set_item_background_colour only work on Windows where they are
supported.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a
href="#trunkwxruby2samplestreectrltreectrlrb">trunk/wxruby2/samples/treectrl/treectrl.rb</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwxruby2samplestreectrltreectrlrb"></a>
<div class="modfile"><h4>Modified:
trunk/wxruby2/samples/treectrl/treectrl.rb (680 => 681)</h4>
<pre class="diff"><span>
<span class="info">---
trunk/wxruby2/samples/treectrl/treectrl.rb        2006-10-17
18:03:26 UTC (rev 680)
+++
trunk/wxruby2/samples/treectrl/treectrl.rb        2006-10-17
18:47:27 UTC (rev 681)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> TreeTest_DecSpacing,
</span><span class="cx"> TreeTest_ToggleIcon,
</span><span class="cx"> TreeTest_Select,
</span><del>-TreeTest_Unselect = (0..39).to_a
</del><ins>+TreeTest_Unselect =
(Wx::ID_HIGHEST..Wx::ID_HIGHEST+39).to_a
</ins><span class="cx"> TreeTest_Ctrl = 1000
</span><span class="cx">
</span><span class="cx"> TreeCtrlIcon_File,
</span><span class="lines">@@ -271,9 +271,10 @@
</span><span class="cx">
</span><span class="cx"> id,cookie =
get_next_child(root_id,cookie)
</span><span class="cx"> id,cookie =
get_next_child(root_id,cookie)
</span><del>- set_item_text_colour(id, Wx::RED)
- # Not supported on OS X
- set_item_background_colour(id, Wx::LIGHT_GREY)
</del><ins>+ if Wx::PLATFORM == "WXMSW"
+ set_item_text_colour(id, Wx::RED)
+ set_item_background_colour(id, Wx::LIGHT_GREY)
+ end
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def
get_items_recursively(parent_id, cookie)
</span><span class="lines">@@ -986,7 +987,7 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def on_about(event)
</span><del>- message_box("Tree test sample\n" +
</del><ins>+ Wx::message_box("Tree test sample\n" +
</ins><span class="cx">
"(c) Julian Smart 1997, Vadim Zeitlin 1998",
</span><span class="cx"> "About tree
test",
</span><span class="cx">
Wx::OK|Wx::ICON_INFORMATION, self)
</span></span></pre>
</div>
</div>
</body>
</html>
Apparently Analagous Threads
- [832] trunk/wxruby2/samples: Fix samples for TreeItemIds as integers, fix image size in treectrl sample
- [806] trunk/wxruby2/samples/treectrl: Restored demonstration of use of icons and fonts within TreeCtrl
- [1009] trunk/wxruby2/samples/treectrl/treectrl.rb: ok method name changed to is_ok
- [ wxruby-Bugs-13734 ] Problem with TreeCtrl#get_first_child and #get_next_child on MSW
- TreeCtrl update
