GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Jun-2005, 06:59
sgall sgall is offline
New Member
 
Join Date: Jun 2005
Posts: 3
sgall is on a distinguished road

Cant get Browser tree to work


I cant get the following code to work, as documented in the fltk2 chm file.
I want to display a tree or hierarchy not just "/dog/cat" on one line.
I am using the FLTK2 devpak from www.fltk.net with Dev-c++ and mingw.

I am tried various quoting eg
/dog/cat and \/dog\/cat and \\/dog\\/cat.

I have tried both add() forms and also add_many().

Any help would be appreciated.


CPP / C++ / C Code:
// generated by Fast Light User Interface Designer (fluid) version 2.0100

#include "junk.h"

fltk::Input* input;

static void cb_input(fltk::Input*, void*) {
  browser->add_many( "\\/dog\\/cat");
  browser->add(input->value(),0,0)
;}

fltk::Browser* browser;

fltk::Window* make_window() {
  fltk::Window* w;
   {fltk::Window* o = new fltk::Window(503, 449);
    w = o;
    o->begin();
     {fltk::Group* o = new fltk::Group(0, 0, 500, 45);
      o->box(fltk::PLASTIC_UP_BOX);
      o->color((fltk::Color)0xdbc7ff00);
      o->begin();
       {fltk::Input* o = input = new fltk::Input(60, 5, 190, 25, "input:");
        o->callback((fltk::Callback*)cb_input);
        o->when(fltk::WHEN_ENTER_KEY_ALWAYS);
      }
      o->end();
    }
     {fltk::Browser* o = browser = new fltk::Browser(0, 50, 500, 395);
      fltk::Group::current()->resizable(o);
    }
    o->end();
  }
  return  w;
}

#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/run.h>
#include "junk.h"
using namespace fltk;

int main(int argc, char **argv)
{
    Window *window = make_window();

    //Set type to DIALOG
    //window->window_type(DIALOG);
    window->end();
    window->show(argc, argv);

    return run();
}


:-? :-? :-?
Last edited by LuciWiz : 09-Jun-2005 at 07:34. Reason: Please insert your C++ code between [c++] & [/c++] tags
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
printing binary search tree nkhambal C Programming Language 2 26-Mar-2005 04:01
Displaying node attributes in an XML tree display njp01u MS Visual C++ / MFC Forum 2 07-Feb-2005 18:42
Why doesnt my form work correctly? rhino1616 Web Design Forum 2 06-Nov-2003 18:21

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:02.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.