WPCubed Product Support

Select Field on Enter

Hi Julian,

i am looking for possibility to select EditFields on Enter (Mouse or Cursor left/right)!

OnEditFieldFocus only works if you move from one Field to another..

Thanks

Patrick

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

Hi,

OnEditFieldFocus is for the form completion mode only (see EditField demo)

This may be an alternative

procedure TWPTBXForm.WPRichText1ChangeSelection(Sender: TObject);
var f: TWPTextObj;
begin
  f := WPRichText1.FieldAtCP;
  if f<>LastField then
  begin
     LastField := f;
     if (f<>nil) and not WPRichText1.IsSelected then
     begin
      WPRichText1.SelectFieldAtCP(false, false);
     end;
  end;
end;
#3 ♥ 0

Hi,

if you move code to Event "OnChangeCursorPos" everything is ok...

Thank you

Patrick

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