wxFormBuilder now has a CustomCode abstract component that is used to insert code into the constructor or Create(...) function. No reason was given as to what problem this is designed to solve. The property editor accepts multiple lines, but inserts the \n directly into the line, so there doesn't appear to be a way to insert a block or snippet of code. The code is inserted after the this->Layout() call, so if the inserted code is making any modifications to the UI, then it will have to call Layout() again. Multiple components can be added, which at least makes it possible to insert multiple lines.
As currently implemented, it appears to be more of an internal hack rather then a generally useful feature, so I'm not inclined to support it at the moment. I'm creating the issue and leaving it open because if we add the ability to insert a code snippet, the it might be useful to import this.
Description:
wxFormBuilder now has a
CustomCode
abstract component that is used to insert code into the constructor orCreate(...)
function. No reason was given as to what problem this is designed to solve. The property editor accepts multiple lines, but inserts the\n
directly into the line, so there doesn't appear to be a way to insert a block or snippet of code. The code is inserted after thethis->Layout()
call, so if the inserted code is making any modifications to the UI, then it will have to callLayout()
again. Multiple components can be added, which at least makes it possible to insert multiple lines.As currently implemented, it appears to be more of an internal hack rather then a generally useful feature, so I'm not inclined to support it at the moment. I'm creating the issue and leaving it open because if we add the ability to insert a code snippet, the it might be useful to import this.