FXRuby: FXList FRAME_RAISED does not work

Hello dear rubies and foxes

The following does not work as expected.

FXList.new(app, 5, nil, 0, LIST_SINGLESELECT|FRAME_RAISED)

It selects only one (so i’v put it at the right position) but there is
no frame (FRAME_SUNKEN neither). wich suprises me because due to the
RDdocs(i haven’t testet this personally) FXList should inherit this from
FXWindow, and it is working with FXTreeList.

it’s FXRuby-1.0.19 and FOX-1.0.29 and i’m asking for help.
thank’s for your help

hunting foxes || hunted by foxes
Matthias Wieding-Drewes

···


/"
\ /
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \

Matthias Wieding-Drewes wrote:

The following does not work as expected.

FXList.new(app, 5, nil, 0, LIST_SINGLESELECT|FRAME_RAISED)

It selects only one (so i’v put it at the right position) but there is
no frame (FRAME_SUNKEN neither). wich suprises me because due to the
RDdocs(i haven’t testet this personally) FXList should inherit this from
FXWindow, and it is working with FXTreeList.

Frame hints are only meaningful to classes descended from FXFrame.
Neither FXList nor FXTreeList is derived from FXFrame, so they are
unaffected by any frame hints that you might pass into their constructors.

If you want either of these widgets to appear in, say, a raised frame,
the solution is to create a frame widget of some kind, e.g.

 listFrame = FXVerticalFrame.new(p,
     FRAME_RAISED|FRAME_THICK)

and then make the list as a child of that frame:

 list = FXList.new(listFrame, 5, nil, 0,
     LIST_SINGLESELECT|LAYOUT_FILL_X|LAYOUT_FILL_Y)

Hope this helps,

Lyle

Yes it does. Thank you. i have overlooked that somaway through my night
now a can sleep. thank you.

Matthias

···

On Sat, 15 Feb 2003 12:13:28 +0900 Lyle Johnson lyle@users.sourceforge.net wrote:

Frame hints are only meaningful to classes descended from FXFrame.
Neither FXList nor FXTreeList is derived from FXFrame, so they are
unaffected by any frame hints that you might pass into their
constructors.

If you want either of these widgets to appear in, say, a raised frame,
the solution is to create a frame widget of some kind, e.g.

 listFrame = FXVerticalFrame.new(p,
     FRAME_RAISED|FRAME_THICK)

and then make the list as a child of that frame:

 list = FXList.new(listFrame, 5, nil, 0,
     LIST_SINGLESELECT|LAYOUT_FILL_X|LAYOUT_FILL_Y)

Hope this helps,

Lyle


/"
\ /
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \

I also like to note that if you add a (sunken) frame around a scroll widget
(FXList, FXTreeList etc) it looks nicer to remove the default internal
padding that has been added by the frame.

So in that case your constructor would be:

listFrame = FXVerticalFrame.new(p,FRAME_SUNKEN|FRAME_THICK,0,0,0,0, 0,0,0,0)

See for a example: http://www.fifthplanet.net/cgi-bin/wiki.pl?FOX_Style_Guide

Ofcourse… some people might like the added padding… :wink:

Sander

···

On Friday 14 February 2003 09:13 pm, Lyle Johnson wrote:

Matthias Wieding-Drewes wrote:

The following does not work as expected.

FXList.new(app, 5, nil, 0, LIST_SINGLESELECT|FRAME_RAISED)

It selects only one (so i’v put it at the right position) but there is
no frame (FRAME_SUNKEN neither). wich suprises me because due to the
RDdocs(i haven’t testet this personally) FXList should inherit this from
FXWindow, and it is working with FXTreeList.

Frame hints are only meaningful to classes descended from FXFrame.
Neither FXList nor FXTreeList is derived from FXFrame, so they are
unaffected by any frame hints that you might pass into their constructors.

If you want either of these widgets to appear in, say, a raised frame,
the solution is to create a frame widget of some kind, e.g.

 listFrame = FXVerticalFrame.new(p,
     FRAME_RAISED|FRAME_THICK)

and then make the list as a child of that frame:

 list = FXList.new(listFrame, 5, nil, 0,
     LIST_SINGLESELECT|LAYOUT_FILL_X|LAYOUT_FILL_Y)

Hope this helps,

Lyle


Outside of a dog, a book is a man’s best friend. Inside of a dog, it’s too
dark to read.