Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 121 to 135 of 508, page 9 of 34
<< previous next >>
TWebUpdate
Writing custom TWebUpdateWizard translation components
Writing custom TWebUpdateWizard translation components
It is very simple to create a translated version of the TWebUpdateWizard by providing a TWebUpdateWizardLanguage component. To write a custom version, create a class that descends from TWebUpdateWizardLanguage, override the constructor and provided the translated texts.
As an example, this is the source code for the dutch translated version:
constructor TWebUpdateWizardDutch.Create(AOwner: TComponent); begin inherited; Welcome := 'Druk start om te beginnen met controleren voor applicatie updates ...'; StartButton := 'Start'; NextButton := 'Volgende'; ExitButton := 'Verlaten'; CancelButton := 'Annuleren'; RestartButton := 'Herstarten'; GetUpdateButton := 'Update'; NewVersionFound := 'Nieuwe version gevonden'; NewVersion := 'Nieuwe versie'; NoNewVersionAvail := 'Geen nieuwe versie beschikbaar.'; NewVersionAvail := 'Nieuwe versie beschikbaar.'; CurrentVersion := 'Huidige versie'; NoFilesFound := 'Geen bestanden gevonden voor update'; NoUpdateOnServer := 'geen update gevonden op server ...'; CannotConnect := 'Er kan geen verbinding met de update server tot stand gebracht worden of'; WhatsNew := 'Nieuw in update'; License := 'Licentie overeenkomst'; AcceptLicense := 'Ik aanvaard'; NotAcceptLicense := 'Ik aanvaard niet'; ComponentsAvail := 'Beschikbare applicatie componenten'; DownloadingFiles := 'Downloaden bestanden'; CurrentProgress := 'Vooruitgang huidig bestand'; TotalProgress := 'Totale vooruitgang'; UpdateComplete := 'Update volledig ...'; RestartInfo := 'Druk Herstarten om de nieuwe versie te starten.'; WhatsNewPopup := ‘Bekijken met kladblok’; LicensePopup := ‘Bekijken met kladblok’; end;
TMS Workflow Studio
Adding users and groups
Adding users and groups
Workflow Studio is strongly based on tasks, which in turn are always assigned to an user or a group of users. So, Workflow Studio does also need to use information about users and groups.
This can be done at the beginning of the program. The code below is an example that shows how to add users and groups to Workflow Studio.
{Add users and groups} With WorkflowStudio.UserManager do begin {Add all users} Users.Clear; Users.Add('1', 'John', 'john@domain'); Users.Add('2', 'Sarah', 'sarah@domain'); Users.Add('3', 'Scott', 'scott@domain'); Users.Add('4', 'Mario', 'mario@domain'); Users.Add('5', 'Tina', 'tina@domain'); {Add groups and specify which users belong to each group} Groups.Clear; With Groups.Add('managers') do begin UserIds.Add('1'); //John UserIds.Add('2'); //Sarah end; With Groups.Add('programmers') do begin UserIds.Add('3'); //Scott UserIds.Add('4'); //Mario UserIds.Add('5'); //Tina end; end;
TMS Workflow Studio
Sending e-mails
Sending e-mails
There are several points in the workflow definition where an e-mail can be sent. An example is when a task instance is created for an user. If the task definition properties of this task instance is marked as "Send e-mail notification", an e-mail will be sent to the user notifying him that the task instance was created and assigned to him.
However, there is no built-in code to send e-mails in Workflow Studio. When an e-mail is to be sent, the event OnSendMail of TWorkflowStudio component is fired. So, if you want your workflow so support e-mail sending, create an event handler for TWorkflowStudio.OnSendMail event, and send the e-mail yourself from there, using your own method.
The signature for the OnSendMail event is below:
type TEmailInformation = record ToAddr: string; From: string; Bcc: string; Cc: string; Subject: string; Text: string; end; procedure(Sender: TObject; TaskIns: TTaskInstance; AUser: TWorkflowUser; AEmailInfo: TEmailInformation; var Sent: boolean) of object;
Set Sent parameter to true when the e-mail is sent. For extra information (you will often use only AEmailInfo), you can use TaskIns and AUser parameters to know which task instance generated the e-mail, and for each workflow user the e-mail is about to be sent.
TMS VCL Chart
Setting a custom division on the X-Axis
Setting a custom division on the X-Axis
With this code, you can switch of the autounits and set a custom division on the X-Axis:
AdvChartView1.Panes[0].Series[0].XAxis.AutoUnits := False; AdvChartView1.Panes[0].Series[0].XAxis.MajorUnit := 10; AdvChartView1.Panes[0].Series[0].XAxis.MinorUnit := 0;
TAdvStringGrid
Importing data with TAdvGridExcelIO in a grid that already contains data
Importing data with TAdvGridExcelIO in a grid that already contains data
With AdvGridExcelIO.GridStartCol / AdvGridExcelIO.GridStartRow, you can set the top left corner from where the import starts.
TMS VCL Chart
What is the difference between TMS Advanced Charts for IntraWeb and TMS Advanced Charts
What is the difference between TMS Advanced Charts for IntraWeb and TMS Advanced Charts
There is no difference.
TMS Advanced Charts for IntraWeb is equal to TMS Advanced Charts. The product contains chart components that can be used for VCL Windows application development as well as IntraWeb web application development.
TAdvSpreadGrid
When try to install TAdvSpreadGrid, I get an error 'AdvSprd.pas(187): E2003 Undeclared identifier: "TVAlignment ... Could not compile used unit "AdvSprd.pas" "'
When try to install TAdvSpreadGrid, I get an error 'AdvSprd.pas(187): E2003 Undeclared identifier: "TVAlignment ... Could not compile used unit "AdvSprd.pas" "'
Add the unit AdvObj to the uses clause of AdvSprd.pas and this issue should be fixed.
TPlanner
Adding a messagebox to query if it is allowed to effectively delete a PlannerItem
Adding a messagebox to query if it is allowed to effectively delete a PlannerItem
When the TMS T(DB)Planner.AutoInsDel is set to true, deleting a PlannerItem can be done by just selecting the PlannerItem and pressing DEL. To add a messagebox to query if it is allowed to effectively delete the PlannerItem, add following code to the OnItemDelete event:
procedure TForm2.Planner1ItemDelete(Sender: TObject; Item: TPlannerItem); begin if MessageDlg('Delete this item?',mtConfirmation,[mbYes,mbNo],0) = mrNo then Abort; end;
TDBPlanner
Adding a messagebox to query if it is allowed to effectively delete a PlannerItem
Adding a messagebox to query if it is allowed to effectively delete a PlannerItem
When the TMS T(DB)Planner.AutoInsDel is set to true, deleting a PlannerItem can be done by just selecting the PlannerItem and pressing DEL. To add a messagebox to query if it is allowed to effectively delete the PlannerItem, add following code to the OnItemDelete event:
procedure TForm2.Planner1ItemDelete(Sender: TObject; Item: TPlannerItem); begin if MessageDlg('Delete this item?',mtConfirmation,[mbYes,mbNo],0) = mrNo then Abort; end;
TMS Smooth Controls Pack
Using the fill editor at runtime
Using the fill editor at runtime
For the TMS smooth controls series of components, a fill property is used that allows to set the fill characteristics of the various graphic elements in the controls. The controls come with a special fill edit dialog that is used at design time to allow the designer to customize fills for the components. This fill editor can be used at runtime as well. To do this, add the unit AdvSmoothFillEditor to the uses clause and add for example to edit the fill of a TAdvSmoothPanel on the form, following code:
procedure TForm2.Button1Click(Sender: TObject); var fd: TAdvSmoothFillEditorDialog; begin fd := TAdvSmoothFillEditorDialog.Create(self); try fd.Fill := AdvSmoothPanel1.Fill; if fd.Execute then AdvSmoothPanel1.Fill.Assign(fd.Fill); finally fd.Free; end; end;
TAdvSmoothFillEditorDialog* editor = new TAdvSmoothFillEditorDialog(this); editor->Fill = AdvSmoothPanel1->Fill; editor->Execute();
TMS Workflow Studio
Localizing strings
Localizing strings
Workflow Studio provides an easy way to localize the strings. All strings used in user interface (messages, button captions, dialog texts, menu captions, etc.) are in a single file names wsLanguage.pas.
In the languages folder, included in Workflow Studio distribution, there are several wsLanguage.pas files available for different languages. Just pick the one you want and copy it to the official directory of your workflow studio source code.
If the language you want does not exist, you can translate it yourself. Just open wsLanguage.pas file and translate the strings to the language you want.
As a final alternative, you can translate the wsLanguage.txt file, also included in ws_languages.zip file, and send the new file to us. The advantage of this approach is that this file is easier to translate (you don't have to deal with pascal language) and can be included in the official Workflow Studio distribution. This way we keep track of changes in translable strings and all new strings are marked in the upcoming releases. This way, you will always know what is missing to translate, and do not need to do some kind of file comparison in every release of Workflow Studio.
So, in summary, to localize Workflow Studio strings:
Option 1
- Pick the correct wsLanguage.pas file from the ws_languages.zip file, according to the language you want. - Replace the official wsLanguage.pas (in source code directory) by the one you picked.
Option 2
- Translate the official wsLanguage.pas directly
Option 3
- Translate the wsLanguage.txt file and send it to us (support@tmssoftware.com). - We will send you back a translated wsLanguage.pas file and this translation will be included in official release.
TMS VCL Chart
Using custom Y-Axis labels
Using custom Y-Axis labels
it is possible to use custom Y-Axis labels by implementing the OnYAxisGetValue event:
AdvChartView1.Panes[0].Series[0].OnYAxisGetValue := YAxisGetVal; procedure TForm1.YAxisGetVal(Sender: TObject; Serie: TChartSerie; Value: double; var AValue: string); begin AValue := floattostr(Value - 15); end;
TAdvOutlookList
How to get the selected item
How to get the selected item
AdvOutlookList.FirstSelectedItem : POGLItem returns the first selected item, from there AdvOutlookList.NextSelectedItem allows to further query for other selected items. NextSelectedItem returns nil when there are no more selected rows.
TAdvStringGrid
Customizing the TAdvStringGrid Find Dialog
Customizing the TAdvStringGrid Find Dialog
A customization of this dialog have to be done by opening & editing ASGREPLACE.PAS.
This is where the dialog is defined.
TEditListBox
Adding many items to the list fast
Adding many items to the list fast
To add many items to the TEditListBox, the use of BeginUpdate / EndUpdate will significantly accelerate this:
EditListBox.BeginUpdate; // add items here EditListBox.EndUpdate;