Creating split screens programatically

  • Hello,

    Trying to create a split screen in code. As a test I've dropped two WPRichText editors on a form, set AllowMultiView to True and then dropped a TWPRTFStorage control and a TButton on the form.

    In the button onClick event I add the following code:

    This doesnt work. The second RichText editor stays blank. What am I missing? When I create the links using the Links property editor at design time it works!

    Regards,

    Paul

  • Hello WpTools,

    Forgot to add that I have included the OnInitializeRTFDataObject event and tied the event to the two RichText editors.

    Code
    if RTFData = nil then begin
      	RTFData := TWPRTFDataCollection.Create(TWPRTFDataBlock);
       	RTFDataProps := TWPRTFProps.Create;
       	RTFData.RTFProps := RTFDataProps;
    	end;
    	RTFDataObject := RTFData;

    Paul