WPCubed Product Support

Check Box in table cell

Hello

Is it possible to create a check box within a table cell? If so I would appreciate a code sample as to how. There is no discussion of this in either the forum, manual or demos.

TIA

John

#1 ♥ 0
4.8k Views 2 users read 2 min
support

Hi,

Checkboxes have to be simulated using objects. The edit field demo uses this technique: Demos\I) MailMerge\EditFields

procedure TWPEdTest.DataEditTextObjectMouseDown(Sender: TWPCustomRtfEdit;
  pobj: TWPTextObj; obj: TWPObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if pobj.Name = 'FORMCHECKBOX' then
  begin
     WPSetCheckBoxValue(pobj,not WPGetCheckBoxValue(pobj)); // utility function to swap true/false and on/off
     DataEdit.IgnoreMouse;
     DataEdit.Repaint;
  end;
end;
#2 ♥ 0

Hello

I am using Delphi XE5 and WP Tools 7.15

When I execute the demo you reference, the form editor tab is empty. If I then click another tab and then return to the form editor tab, the text is displayed; however, there is not check box only the word checkbox.

If I click on the word check box the cursor will navigate to the next text field but the check box field is skipped.

If I check the "show markers" box the markers display for all of the text fields but not the checkbox

I do not see how this functionality is correct?

TIA

John

#3 ♥ 0
This category is archived. No new posts are possible.