Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS IntraWeb iPhone controls pack
Avoid access to non-visual IWEdit controls

When using 2 IWRegion controls that each contain an IWEdit control in combination with a TIWIPhonePageTransition control. If the user presses the "< " ">" keys to move to the next or previous field, they can reach a field on a region that is not being displayed. The display will even show portions of both regions simultaneously.

Solution:

You can set the Enabled property of the IWEdit controls on the non-visual IWRegion controls to false. Then set it to true again when TransitionToNext or TransitionToPrevious is called.

Example:

procedure TIWForm8.TIWIPhoneHeader1AsyncRightButtonClick(Sender: TObject;
  EventParams: TStringList);
begin
  IWEdit1.Enabled := false;
  IWEdit2.Enabled := true;
  TIWIPhonePageTransition1.TransitionToNext;
end;

procedure TIWForm8.TIWIPhoneHeader2AsyncLeftButtonClick(Sender: TObject;
  EventParams: TStringList);
begin
  IWEdit1.Enabled := true;
  IWEdit2.Enabled := False;
  TIWIPhonePageTransition1.TransitionToPrevious;
end;