12.07.2015 Views

TMS Pack for FireMonkey Developers Guide - TMS Software

TMS Pack for FireMonkey Developers Guide - TMS Software

TMS Pack for FireMonkey Developers Guide - TMS Software

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TMS</strong> SOFTWARE<strong>TMS</strong> <strong>Pack</strong> <strong>for</strong> <strong>FireMonkey</strong>DEVELOPERS GUIDEis set to <strong>TMS</strong>FMXTableView1 and we want the RotationAngle to be modified. Fill in RotationAngle inthe Control Expression field. For the Source Expression which is linked with the SourceComponentwe fill in “Value”.Now there is one step left to implement be<strong>for</strong>e the application is ready. When dragging the slider ofthe TrackBar, the RotationAngle of the <strong>TMS</strong>FMXTableView component will be unaffected. This isbecause the <strong>TMS</strong>FMXTableView did not receive a notice from the BindingsList component, there<strong>for</strong>ewe need to notify the bind component that the value of the TrackBar has changed.This is done by implementing the OnChange event and notifying the BindingsList component:varFNotifying: Integer;procedure TForm557.TrackBar1Change(Sender: TObject);begin// Some controls send notifications when setting properties,// like TTrackBarif FNotifying = 0 thenbeginInc(FNotifying);// Send notification to cause expression re-evaluation of dependentexpressionstryBindingsList1.Notify(Sender, '');finallyDec(FNotifying);end;end;end;Now when dragging the slider of the TrackBar, the BindingsList is notified and the <strong>TMS</strong>FMXTableViewrotates according to the Value of the TrackBar. Multiple bindings can be made and are triggeredsimultaneously due to the Notify procedure of the BindingsList.In the BindingsList editor window you will notice that a new category is added <strong>for</strong> the TableView:“DB TableView Links”. The link “T<strong>TMS</strong>FMXBindDBTableViewLink” can be used to connect to aDataSource through a BindScope. This link is designed to work specifically with DataBaseconnections.The TableView DB link automatically generates Expressions to link the SelectedItemIndex to thecorrect record in the Database. Internally the DataSet is automatically loaded and <strong>for</strong> each recordin the DataSet an item is added.50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!