Fox questions

I’ll return to Tycho when I’m less busy, but right now I’m stuck on
some Fox issues. I could continue to develop it without grokking
these things, but I don’t really want to.

  1. Given an FXTreeList wherein I add or change an item, how do I get the
    tree to redisplay?

  2. Given an MDIClient where I add or resize an MDIChild, how do I get it
    to display?

  3. Given an MDIChild with a textbox inside it, can I click on the window
    frame and select the window without giving focus to the textbox?

#1 and #2 are obviously variations on a theme. I’ve tried various
permutations of create, show, repaint, recalc, refresh and one or two
others.

Is there a method called just_show_me_the_damned_widget ?

Hal

Hi

Hal Fulton wrote:

  1. Given an FXTreeList wherein I add or change an item, how do I get the
    tree to redisplay?

IIRC (I don’t have the app running in front of me now) it just worked
when I added a new item:

leaf = tree_list.addItemLast(…)
tree_list.expandTree( tree_list.currentItem )

  1. Given an MDIClient where I add or resize an MDIChild, how do I get it
    to display?

This worked for me:

mdi_child = FXMDIChild.new( mdi_client, …)
mdi_child.create()

  1. Given an MDIChild with a textbox inside it, can I click on the window
    frame and select the window without giving focus to the textbox?

Sorry, I don’t know; maybe it’s possible to intercept whatever message
goes down through the MDIChild to its child.

Is there a method called just_show_me_the_damned_widget ?

LOL

Cheers
alex

alex fenton wrote:

  1. Given an FXTreeList wherein I add or change an item, how do I get the
    tree to redisplay?

IIRC (I don’t have the app running in front of me now) it just worked
when I added a new item:

leaf = tree_list.addItemLast(…)
tree_list.expandTree( tree_list.currentItem )

It may have been renaming items that was the issue. I’ll check.

  1. Given an MDIClient where I add or resize an MDIChild, how do I get it
    to display?

This worked for me:

mdi_child = FXMDIChild.new( mdi_client, …)
mdi_child.create()

It doesn’t for me.

Out of curiosity, what is your version of fxruby and of Fox?

Thanks,
Hal

Hi Hal

Hal Fulton wrote:

  1. Given an MDIClient where I add or resize an MDIChild, how do I get it
    to display?

This worked for me:

mdi_child = FXMDIChild.new( mdi_client, …)
mdi_child.create()

It doesn’t for me.

Out of curiosity, what is your version of fxruby and of Fox?

For this app, I’m using the PragProg 1.6.8 windows build of Ruby; When I
ask it for Fox::VERSION, it tells me ‘1.6.7’.

I’ve found the odd niggle with FXTree, but I haven’t had any problems
with MDIClient/Child. There’s a simple sample with the FXRuby
distribution called mditest.rbw; maybe that’ll work for you?

Cheers
alex