0

My question is about Delphi Object Pascal corresponding run-time calls of TBindNavigator component buttons. I'm interesting of the following buttons:

  • "Post";
  • "Cancel";
  • "Refresh".

How can I implement it in the code without TBindNavigator? Would you please clarify this issue? Thanks.

  • I cannot make much sense of your question. Do you mean how to get notified when the user clicks a certain button on that navigator ? If so, then write a handler for the [`OnClick`](http://docwiki.embarcadero.com/Libraries/XE8/en/Fmx.Bind.Navigator.TCustomBindNavigator.OnClick) event. – TLama Apr 26 '15 at 17:42
  • well,that's unclear what you are exactly asking.. – Nima Derakhshanjan Apr 26 '15 at 17:43
  • Is this correct? You want to do three things that TBindNavigator is useful for, but you want to do them without using TBindNavigator? If so, what have you tried so far? – Ast Pace Apr 26 '15 at 23:04
  • Yes, I want to do three thing without TBindNavigator. How can I do it? – Den Ivanov Apr 27 '15 at 17:53

1 Answers1

1

If you wish to implement the necessary actions with simultaneous check if they are enabled etc. then you do not need TBindNavigator at all. The easiest way is the following:

The sample for an FMX Form:

  1. Add a TActionList to your form.
  2. Add a New Standard Action form LiveBindings node of necessary TFMXBindNavigatePost, TFMXBindNavigateCancel etc. class.
  3. Select this action and set Datasource property.
  4. Assign the action to the necessary TButton or other control.

Steps 2-4 can be done in the other way as well.

  1. Selet the control (i.e. TButton), select property Action and click the arrow on the right.
  2. Select New standard action then LiveBindings. Select the necessary class TFMXBindNavigate*. The action will be assigned to the TButton.
  3. Select TActionList and choose the added action and set DataSource property.

The action will be kept up-to-date by LiveBindings. The necessary controls will become Enabled-Disabled and will act as buttons of TBindNavigator.

asd-tm
  • 3,381
  • 2
  • 24
  • 41