Hi all,
I created a simple application with one button and one richtextbox. The
purpose of the button is to open a FileDialog Common Dialogs to choose a
.txt file:
I created the button event:
evt_button(@button.get_id()){|event| open_file(event)}
the FileDialog widget
@file_dialog = Wx::FileDialog.new(@panel,
message = “Choose a file”,
defaultDir = “”,
defaultFile = “”,
wildcard = “.”,
style = DD_DEFAULT_STYLE,
pos = DEFAULT_POSITION,
sz = DEFAULT_SIZE,
name = “filedlg”)
and the code to run the File.Dialog
def open_file(event)
@file_dialog.show_modal
end
What I don’t know is how can I import data from that file in order to
appear in my richtextbox, although I know that I must pass values to
richtextbox with rich_text_box.value = …
If someone can explain that to me I would be very thankfull
Thanks in advance
Ivo R.