You can use TAdvOfficeHint also for controls that do not have an OfficeHint property, for example in our HTML controls. By implementing the event OnBeforeShowHint, you can control the information for the hint also for controls that do not have an OfficeHint property, only a hint property. This way, you do not need to use THTMLHint. TAdvOfficeHint can also display HTML formatted text. |
Included is a sample that demonstrates how to use gantt charts. |
Simply drop a chart on the form and set the code in the formcreate. The y-axis and y-grid are configured to display every 20 units. Sample code: var s: TChartSerie; p: TChartPane; I: Integer; begin AdvGDIPChartView1.BeginUpdate; AdvGDIPChartView1.Panes.Clear; p := AdvGDIPChartView1.Panes.Add; p.YAxis.AutoUnits := False; p.YGrid.AutoUnits := False; s := p.Series.Add; s.ChartType := ctSpider; s.Pie.Size := 300; s.YAxis.AutoUnits := False; s.YAxis.MajorUnit := 50; s.YAxis.MinorUnit := 10; p.YGrid.MinorDistance := 10; p.YGrid.MajorDistance := 50; p.YGrid.MajorLineColor := clRed; for I := 0 to 9 do begin s.AddSinglePoint((I + 1) * 10); end; AdvGDIPChartView1.EndUpdate; |
This code performs a fast copy of all columns and their items from one TColumnComboBox to another instance: begin ColumnComboBox2.BeginUpdate; ColumnComboBox2.Columns.Assign(ColumnComboBox1.Columns); ColumnComboBox2.ComboItems.Assign(ColumnComboBox1.ComboItems); ColumnComboBox2.EndUpdate; end; |
Sample code: procedure TForm1.TMSFMXGrid1GetCellProperties(Sender: TObject; ACol, ARow: Integer; Cell: TFmxObject); begin if Cell is TTMSFMXBitmapGridCell then (Cell as TTMSFMXBitmapGridCell).Bitmap.Align := TAlignLayout.Client; end; |
To have several columns in the combobox, you need to fill the CellComboBox through an event, that is triggered before the combobox is shown. Sample code: procedure TForm1.FormCreate(Sender: TObject); begin TMSFMXGrid1.DefaultColumnWidth := 100; end; procedure TForm1.TMSFMXGrid1CellEditGetData(Sender: TObject; ACol, ARow: Integer; CellEditor: TFmxObject; var CellString: string); begin if CellEditor is TComboBox then begin (CellEditor as TComboBox).Items.Clear; (CellEditor as TComboBox).Items.Add('Item 1 for ' + IntToStr(ACol) + ':' + IntToStr(ARow)); (CellEditor as TComboBox).Items.Add('Item 2 for ' + IntToStr(ACol) + ':' + IntToStr(ARow)); (CellEditor as TComboBox).Items.Add('Item 3 for ' + IntToStr(ACol) + ':' + IntToStr(ARow)); end; end; procedure TForm1.TMSFMXGrid1GetCellEditorType(Sender: TObject; ACol, ARow: Integer; var CellEditorType: TTMSFMXGridEditorType); begin CellEditorType := etComboBox; end; |
The TTMSFMXPlanner is currently not LiveBindings enabled. We have already added this on our feature request list for investigation. Currently, the planner needs to display items by adding them to the collection manually. If you want to retrieve them from a database, you will need to write the traditional first next loop. Each item has a DBKey property that can be filled with the unique key of the item in the database. I suggest to write a query that fetches the items between the display start and end time in the planner. The current display start and end time can be retrieved with: TMSFMXPlanner1.DisplayStartDateTime; TMSFMXPlanner1.DisplayEndDateTime; You can navigate to the next or previous date / time with the navigation buttons at the top (Interaction.TopNavigationButtons), or programmatically with: TMSFMXPlanner1.NavigateToNextDateTime / TMSFMXPlanner1.NavigateToPreviousDateTime. Reloading the query can be done in the OnAfterNavigateToDateTime. |
Using a custom editor is demonstrated in the Editing demo. You need to drop a custom content panel / control on the form and pass it through the OnGetCustomContentPanel event. The OnItemToCustomContentPanel and OnCustomContentPanelToItem is used to transfer data between item and panel. procedure TForm1.TMSFMXPlanner1CustomContentPanelToItem(Sender: TObject; AContentPanel: TControl; AItem: TTMSFMXPlannerItem); var c: TCheckBox; b: TColorComboBox; begin c := FindChild(AContentPanel, 'chkOperation') as TCheckBox; b := FindChild(AContentPanel, 'cboCategory') as TColorComboBox; AItem.BeginUpdate; AItem.Color := b.Color; AItem.DataBoolean := c.IsChecked; AItem.EndUpdate; end; procedure TForm1.TMSFMXPlanner1GetCustomContentPanel(Sender: TObject; AItem: TTMSFMXPlannerItem; var AContentPanel: TControl); begin if Assigned(AItem) and (AItem.Resource = 1) then AContentPanel := Panel1; end; procedure TForm1.TMSFMXPlanner1ItemToCustomContentPanel(Sender: TObject; AItem: TTMSFMXPlannerItem; AContentPanel: TControl); var l: TLabel; c: TCheckBox; img: TImage; b: TColorComboBox; begin l := FindChild(AContentPanel, 'lblPatient') as TLabel; l.Text := 'Patiënt: ' + AItem.Title; c := FindChild(AContentPanel, 'chkOperation') as TCheckBox; c.IsChecked := AItem.DataBoolean; img := FindChild(AContentPanel, 'imgPatient') as TImage; img.Bitmap.Assign(TMSFMXBitmapContainer1.FindBitmap(AItem.DataString)); b := FindChild(AContentPanel, 'cboCategory') as TColorComboBox; b.Color := AItem.Color; end; |
The - sign is only allowed if Signed is set to true and if it is placed in the first position of the TIWAdvEdit text. The + sign is not allowed with EditType set to edFloat. |
To add a section to the IWResponsiveList set the IsSection property to true of an Item in the Items collection. |
TTIWResponsiveList:
How to add an item with an input field and a button that retrieves the value of the input field |
You can use HTML tags to add form controls to an item. Assign the onclick handler of an HTML button to trigger the OnAsyncControlEvent. Use the OnAsyncControlEvent to execute the AsyncGetAttributes call. For a text field you can use the “value” attribute. The OnAsyncGetAttributes event then returns the requested attribute value(s). Sample code: procedure TformResponsiveList1.IWAppFormCreate(Sender: TObject); var li: TIWListItem; begin li := TIWResponsiveList1.Items.Add; li.Text.Add(' |
By default, Aurelius saves date values in SQLite as native Delphi TDateTime values, i.e., as double (float) values. This works fine if you are only using Aurelius to access the SQLite database. But if you have a legacy SQLite database or want other applications to read the database directly, you might need to use a different format. Aurelius offers two other alternative formats, which is Julian (saves the date values as Julian date times) or Text (which saves in text format “yyyy-mm-dd”). To do that, add this code to the beginning of your application (choose the date time you want and uncomment the correct line). Uses Aurelius.Sql.SQLite, Aurelius.Sql.Register; Var SQLiteGenerator: TSQLiteSQLGenerator; begin SQLiteGenerator := TSQLiteSQLGenerator.Create; // SQLiteGenerator.DateType := TSQLiteSQLGenerator.TDateType.Delphi; // SQLiteGenerator.DateType := TSQLiteSQLGenerator.TDateType.Julian; SQLiteGenerator.DateType := TSQLiteSQLGenerator.TDateType.Text; TSQLGeneratorRegister.GetInstance.RegisterGenerator(SQLiteGenerator); |
As always, we thank all users for the numerous inputs, feedback, comments and suggestions. This is an invaluable help to steer our developments here at TMS software. We continue to look forward to all your further communications to direct our team to provide you better tools and components for your needs.
Kind regards,
TMS software team
Email:
info@tmssoftware.com
Web: http://www.tmssoftware.com
Support, FAQ & Manuals: http://www.tmssoftware.com/site/support.asp