shoes

How to disable edit_line [closed]

随声附和 提交于 2019-12-11 07:57:22
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I would like to disable a text input field ( edit_line in Shoes) for user edition(grey field). I want to have possibility to e.g. set text but I dont want to give that possibility to users. I checked manual but there's nothing about that edit_line , only basics. 回答1: As answered in the comments

Is it possible to open a browser window in Ruby Shoes?

别等时光非礼了梦想. 提交于 2019-12-11 07:16:13
问题 I'm wanting to build a GUI for a Ruby application I maintain using Shoes, but one of the things I'd like to do is be able to display network graphs using the D3 javascript library. After some Googling, I presume it's not possible to embed javascript in a Shoes app. Does anyone know if it's possible to open a browser window from a Shoes app, or better yet embed a browser window within a window in my Shoes app? 回答1: Sure, you didn't mension the color of shoes so i'll use my favorite, green

Shoes: Element.width return 0

馋奶兔 提交于 2019-12-11 06:36:39
问题 I don't understand why the width function is implemented on all elements if it returns 0 for non-zero width elements. The following returns 0 for me. Shoes.app do p = para "My width is: " para p.width end Why is that? (app.width does not return 0) 回答1: The problem is that the size of the para object is determined dynamically when it is drawn. At the time you create the second para, nothing has actually been laid out yet, so a width hasn't been set. You can see that accessing the width after

In shoes, how do I dock a stack to the bottom of the window?

蹲街弑〆低调 提交于 2019-12-11 03:54:54
问题 In shoes, how would I dock a stack to the bottom of the window? For example I have the following snippet. Shoe.app do stack :height => 100 do background red end stack :height => 100 do background blue end end I would like the blue stack to dock to the bottom of the window, and stay there whenever I resize the window. 回答1: To use your example from the mailing list: Shoes.app do @s0 = stack do background red 100.times do para "yay" end end @s = stack do style(:attach => Window, :top => height -

Shoes problems: clipboard and scroll bar

我的未来我决定 提交于 2019-12-11 00:52:33
问题 The code below has (at least) two problems: the Copy button doesn't update the clipboard, and the edit_box doesn't show a vertical scroll bar when it should. Shoes.app (:title => "Test", :width => 1000, :height => 600) do background "#DFA" stack :margin => 30 do flow do button "Paste" do @sql.text = clipboard end button "Copy", :margin_left => 15 do clipboard = @sql.text alert(@sql.text.length.to_s + " characters copied to clipboard.") end end stack :margin_top => 10, :width => "100%",

How can I make simple http requests within a ruby Shoes GUI application?

北慕城南 提交于 2019-12-09 19:36:58
问题 I'm trying to make a simple http request to a local rails application running at localhost:3000. The code for my application is very much in prototype phase as I am only trying to get raw functionality before I try anything else. The rails app simply returns JSON that looks like this before being parsed "{\"response\":\"foo is blank\"}" Here's the code I'm trying right now: require 'net/http' def get_response return Net::HTTP.get(URI.parse("http://localhost:3000")) end Shoes.app(:width => 280

How can I access a 'Browse…' dialog in Shoes?

天大地大妈咪最大 提交于 2019-12-08 06:22:22
问题 Okay so I want to use Shoes for some of my programs, but what I absolutely need is a "Browse..." dialog so the user can browse for a directory/file locally. How can I do that? 回答1: ask_open_file ask_open_folder 回答2: If you target only win32-platform, you could use the Win32API-library, I guess. 来源: https://stackoverflow.com/questions/519978/how-can-i-access-a-browse-dialog-in-shoes

Can Shoes.rb Create Self-Contained Applications?

不打扰是莪最后的温柔 提交于 2019-12-07 09:56:58
问题 It's encouraging that Shoes (the Ruby GUI framework) has excellent packaging functionality, but I'm concerned that it doesn't actually 'wrap' itself around created applications. Packaging for OSX outputs a shoes installer and a shoes file in a .app system. Is there any way that shoes could create a .app that contains shoes - that doesn't make you install shoes to run it? I'm working on creating a tiny application - just a start button and a stop button for a subprocess, etc. 回答1: Hey, sorry I

Problem in Ruby Shoes packaging?

牧云@^-^@ 提交于 2019-12-06 12:43:29
问题 The (Ruby Shoes) packaging solution from Hacketyhack.net doesnt work. Can anyone point me to an alternative? 回答1: There is a shoes/shoes github project that hosts the latest binaries. However, as of (Sept 10, 2009) packaging requires a few patches that remove the dependencies on _why's no longer existent server. I was able to find pack.rb in the Shoes application folder and replace it with this version of pack.rb After that, my packager was able to package basic applications. 回答2: There's a

Does Shoes have a list view control?

十年热恋 提交于 2019-12-06 07:36:36
问题 I was taking a look at Shoes which seems like a very nice tool for quick GUI applications. The common elements/controls, however, don't seem to include the equivalent of a list/report view ( e.g. , ListView in Windows, NSTableView in OS X). Did I just miss this, or does it not (yet) exist? 回答1: If you mean output a large quantity of textual data such as a report or table then there's a nice simple app in the shoebox called the Simple Table Class which works very nicely. Before I found it i