-------------------------------1149512329
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Dear all,
in a GUI, I want to display some text from inside a text file in a text
field.
When starting the application, it looks roughly like this
################
# filelist window #
################
contents of file:
################
# text field #
################
Now, as the user chooses some file from above, its text should
appear inside the text field (which it does) and the name of the
file should appear above it, changing
contents of file: to contents of file: my_file.txt, if that's
the name of the file.
I've searched the archive of the mailing lists, and found
a way to add a label , to recalc everything and to create the
whole frame anew:
class YourWidget < FXVerticalFrame
def addLabel(parent,text)
FXLabel.new(parent, text) do |label|
label.create
end
self.recalc
end
end
So I use :
class Mainwindow
def initialize
...
@headerontents of file'
@topFrame XVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y)
@header_line靆abel.new(@topFrame, @header, nil, LAYOUT_FILL_X)
...
end
def loadFile
....
@headerョフィタニャァテ ァ ォ タゥ
ョョョ
ノ ァ タ ョ ネ
ソ
ヤ 。
ツ ャ
チリ
ュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュュアアエケオアイウイケュュ