[fltk.general] Re: Custom widgets in FLUID

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Custom widgets in FLUID "anmol.... 13:13 May 05 top right image
 
I got my answer from this tutorial - http://www.c-jump.com/bcc/common/Talk2/Cxx/FltkFluidClass/FltkFluidClass.html#W01_0120_adding_custom_widget

>>>
  • Similar to other widgets, click FLUID menu

    New/Other/Box
  • to add a custom widget to the window. It appears in the design view as a square box.

  • In the properties window for our custom widget,

    • Enter the name of the class, e.g. Drawing2D in the Class: field.

    • In the Extra Code: field enter #include "path/Drawing2D.h" to make sure that the class header is included.

  • >>>
    The widget will only appear after you compile and run it. It will not show in the preview window from within FLUID.

    Thank you for this feature.
    On Thursday, May 6, 2021 at 1:29:14 AM UTC+5:30 anmol....@gmail.com wrote:
    From the documentation,

    >>>

    The constructor should have the following arguments:

    MyClass(int x, int y, int w, int h, const char *label = 0);

    This will allow the class to be used in FLUID without problems.

    >>>

    I have a Double_Window() -> Tabs () -> Group () inside FLUID. When I try to add anything from New -> Code it automatically adds it outside the window.

    The only widgets that can be added via FLUID are the pre-defined widgets inside the New -> (NOT Code)

    Inside the FLUID example, we use the CubeView class but again, all the widgets added are the pre-defined widgets in FLUID.

    Am I missing something that will allow me to add custom widgets ?

    --
    You received this message because you are subscribed to the Google Groups "fltk.general" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/0c3e1115-5a94-4d0b-b03c-9132f652ac50n%40googlegroups.com.
    Direct Link to Message ]
     
    bottom left image   bottom right image
    Previous Message ]New Message | Reply ]Next Message ]
     
     

    Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.