Creating IWRadioButtons Dynamically in Intraweb Apps
Posted by Olaf Monien in Delphi, Development, IntraWeb, tags: Delphi, IntraWeb, RadioButtonIf creating IW controls dynamically, then always be sure to explicitly set their Name. They won’t always get a default name – and empty names may lead to strange behaviors.
If you create IWRadioButtons dynamically, then also be careful that you always set their “Name” and “Value” properties to the same value – unless you know what you are doing. Value is important for correct control and group recognition during postbacks. Sounds odd but has to do with the way how the underlying INPUT HTML controls are working.
Unfortunately, at least in IntraWeb 9.0, IWRadioButtons synchronize Name and Value at design-time only (no idea why – I cannot remember having touched that during my time at Atozed). The attached IWComRadioButton source file fixes that, so that you only have to care about “Name”.
Source: IWCompRadioButton.zip
Note: That file is for IntraWeb 9.0. It may work with older or newer versions, but I did not test that. This is not an official file version, but just a personal contribution to the freely available visual control source files of IntraWeb. Use modified sources at your own risk – the guys at Atozed can support their own versions only.





Entries (RSS)