# Question about wxbutton?

**URL:** <https://www.ruby-forum.com/t/question-about-wxbutton/182950>\
**Category:** wxRuby\
**Created:** [February 5, 2010, 5:56am UTC](https://www.ruby-forum.com/t/question-about-wxbutton/182950 "2010-02-05T05:56:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [February 5, 2010, 5:56am UTC](https://www.ruby-forum.com/t/question-about-wxbutton/182950/1 "2010-02-05T05:56:00Z")

</div>

hello, I have some question.

when I use wxbutton. the button is a simple window system theme how can  
I change this button to window vista button style?

and how can I remove cmd box in background?

see picture for more details.

thank you:)

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [February 5, 2010, 6:58am UTC](https://www.ruby-forum.com/t/question-about-wxbutton/182950/2 "2010-02-05T06:58:57Z")

</div>

I’m not sure about vista style button  
since I don’t use vista  
but in xp there is a way to make the button using xp style,  
by adding some xml file into ruby/bin directory.  
Perhaps another who use vista can help?

about remove cmd box in background, try changing your file extension  
from  
.rb to .rbw

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [February 5, 2010, 7:05am UTC](https://www.ruby-forum.com/t/question-about-wxbutton/182950/3 "2010-02-05T07:05:07Z")

</div>

thank for the answer to remove cmd box it’s work!

but I try to searching the way to change button style someone know? :’(

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [February 5, 2010, 11:38pm UTC](https://www.ruby-forum.com/t/question-about-wxbutton/182950/4 "2010-02-05T23:38:39Z")

</div>

On 05/02/2010 04:56, Pat K. wrote:

> when I use wxbutton. the button is a simple window system theme how can  
> I change this button to window vista button style?

Try these steps here:

> **[Windows XP Visual Style Controls with wxRuby](http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html)**
>
> wxRuby uses the native Microsoft Windows common controls when displaying widgets on a Windows OS. You may have noticed, however, that the fo...

This blog suggests that wxWidgets by and large supports Vista-style  
widgets out the box:

[http://wxwidgets.blogspot.com/2007/02/wxwidgets-under-vista.html](http://wxwidgets.blogspot.com/2007/02/wxwidgets-under-vista.html)

cheers  
alex

---

<div class="post-metadata">

**Author:** ![blitzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecae2f/32.png) [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Post date:** [February 12, 2010, 2:03pm UTC](https://www.ruby-forum.com/t/question-about-wxbutton/182950/5 "2010-02-12T14:03:29Z")

</div>

Alex F. wrote:

> On 05/02/2010 04:56, Pat K. wrote:
> 
> > when I use wxbutton. the button is a simple window system theme how can  
> > I change this button to window vista button style?
> 
> Try these steps here:
> 
> [http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html](http://rubyonwindows.blogspot.com/2007/10/windows-xp-visual-style-controls-with.html)
> 
> This blog suggests that wxWidgets by and large supports Vista-style  
> widgets out the box:
> 
> [wxBlog: wxWidgets under Vista](http://wxwidgets.blogspot.com/2007/02/wxwidgets-under-vista.html)
> 
> cheers  
> alex

Some time ago I encountered the same problem and was given a solution:  
[http://www.ruby-forum.com/topic/190390#new](http://www.ruby-forum.com/topic/190390#new)  
Additionally, I checked what happens if the script is compiled with OCRA  
and found that, if you include the manifest via the -dll option, the  
correct styles were used automatically.

> and how can I remove cmd box in background  
> Run the script with rubyw.exe, but beware that every attempt to write to  
> $stdout (unless you redirected it) will now result in an error. The old  
> OCI used to run scipts with the .rbw extension with rubyw.exe, but for  
> the new RubyInstaller I don’t know. What’s your Ruby version?

Marvin
