Author Topic: custom widgets in gui Designers  (Read 2640 times)

Offline hcetiner

  • Multiple posting newcomer
  • *
  • Posts: 13
custom widgets in gui Designers
« on: April 11, 2009, 12:33:12 am »
if I develop custom widgets ;
is it also posssible use it in GUIBuilders like wxsmith or wxformBuilder ?
or the given controls in that GUI Builders are static only?

regards

Offline Ganbito

  • Multiple posting newcomer
  • *
  • Posts: 79
Re: custom widgets in gui Designers
« Reply #1 on: April 11, 2009, 04:15:47 pm »
In wxSmith it is possible in 3 ways. If I remember correctly, in wxFormBuilder there are are least 2 ways (similar to the second and third in the following list), but I didn't try them, I'm comfortable with wxSmith.

  • If your widget is derived from one of the supported by wxSmith, and have a constructor with the same parameters, you can use the supported widget and change the class name in the property editor. You have to set the include file manually in the source code.
  • Use the Custom widget wich came with wxSmith by default. It provides a black box as preview, but let you set in the property editor: class name, include file and constructor parameters.
  • If you want a true preview and/or custom properties and code generation, you have to create your own extension to wxSmith (a Code::Blocks plugin) that adds your widgets to wxSmith. If you are decided to do that, you must see the related wiki-article: WxSmith extensions. It may be helpful to take a look the source of wxSmith - ContribItems and wxSmithAui.