TChart lite component features - delphi

Does TChart lite component included in RAD Studio XE4 environment support GDI+ rendering or not ? Feature matrix doesnt tak about it.
http://www.steema.com/featurematrix/vcl
Searching in installation directory I found file VCLTee.TeeGDIPlus.hpp containing declaration of class TGDIPlusCanvas.
If yes then how to enable it ?

To activate GDIPlus in C++Builder applications, add the header to the .h:
#include <VclTee.TeeGDIPlus.hpp>
And then create the Canvas directly:
Chart1->Canvas = new TGDIPlusCanvas();
or through a variable:
TGDIPlusCanvas *myGDIPlus = new TGDIPlusCanvas();
Chart1->Canvas = myGDIPlus;

Related

Xamarin Android: F# icon not being picked up by Resources

Create an F# Xamarin Android project in Visual Studio 10.
The template contains a set of mipmap folders, to which you can add your own icons.
If I add the icon my_icon.png to each of the mipmap folders, then they should be picked up as a drawable resource: i.e. I should be able to use
type MyResources = MyProject.Resource
and then the compiler should pick up
let myIcon = MyResources.Drawable.my_icon
But it isn't.
Is this a bug? And is there a workaround?
The answer is laughably obvious.
The resource lives in MyResources.Mipmap:
let myIcon = MyResources.Mipmap.my_icon

TBX and SpTBX: Components missing or renamed in SpTBX

I am migrating my Delphi 7 code to Delphi XE4. In Delphi 7 code, TBX components are used. But for Delphi XE4, TBX components are changed to SpTBX (Now developed by SilverPoint) as per this link of stackoverflow
Toolbar 2000 under Delphi XE?
So, I downloaded and installed SpTBX for Delphi XE4. I think some controls are changed or renamed in SpTBX.
For example, in my Delphi 7 code, there was TTBXDropDownItem component in TBX packages, but it seems to be removed from SpTBX package. I have found TSpTBXCombobox in SpTBX but it does not have the properties which are present in TTBXDropDownItem.
Delphi 7 (TBX)
object myDropDown: TTBXDropDownItem
Action = actZoom
EditWidth = 60
ShowImage = True
AlwaysSelectFirst = False
DropDownList = True
LinkSubitems = mnuViewZoom
end
Delphi XE4 (SpTBX)
object myDropDown: TSpTBXCombobox
end
I just wanted to know whether TSpTBXCombobox is the replacement of TTBXDropDownItem? If yes, what are the similar properties which are used in TTBXDropDownItem in TSpTBXCombobox because I did not find Action, EditWidth, ShowImage, AlwaysSelectFirst, DropDownList and LinkSubitems in TSpTBXCombobox.

Can an XNA Game use IsolatedStorageSettings for WP7?

I've been trying to port some Windows Phone 7 code between Silverlight to XNA which relies on IsolatedStorageSettings but I can't get Visual Studio to resolve it. When I have a look at what Intellisense is resolving under System.IO.IsolatedStorage & it lists IsolatedStorageFile, IsolatedStorageException & IsolatedStorageStream.
The documentation says that the supported version is for Silverlight but I don't understand why I am seeing the difference because of the project types.
http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(SYSTEM.IO.ISOLATEDSTORAGE.ISOLATEDSTORAGESETTINGS);k(ISOLATEDSTORAGESETTINGS);k(TargetFrameworkMoniker-%22SILVERLIGHT,VERSION%3dV4.0%22);k(DevLang-CSHARP)&rd=true
Thanks
The following work for me in an XNA project with no extra project references:
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
store.CreateFile("folder/file.ext");
}
After adding a reference to System.Windows.dll I can then do:
var settings = IsolatedStorageSettings.ApplicationSettings;
settings.Add("something", "myValue");
settings.Save();
If you can't get the above working, can you post an example of what you're trying.

Delphi: EReadError with message 'Property Persistence does Not Exist'

My program written with Delphi 7 compiles OK, but when I run it it gives me the error message:
Project1.Exe raised exception class EReadError with Message 'Property Persistence does Not Exist'. Process Stopped.
This only started after I installed the TMS Component Pack to use with this project. Thanks for any help.
Open the Form in Delphi IDE
Use Alt + F12 to edit the .DFM source
Search the "Persistence" property
Delete the line with "Persistence" property
DFM example:
SomeComponent1 = TSomeComponent
OtherProperty = OtherValue
Persistence = True
AnotherProperty = AnotherValue
end
Also you can use the great DFMCheck 1.4 tool, by Andreas Hausladen. To check any other missing property like that:
http://andy.jgknet.de/blog/?page_id=177
This is most likely caused by the compiled & installed package being out of sync with the actual .pas file. If you have source code then rebuilding the packages will probably fix it.
Set a breakpoint(F5) and step the program(F7/F8).Get to the location where you get that exception and then give us more information about it(show some code).
This error means that it's trying to load something (usually a form) from a DFM resource and it comes up with a value for a property that the component it's creating doesn't have.
If it only happened when you started using TMS components, the solution is simple: don't use them. Send as much information as you can about the error and the project that caused it to the authors and see if they can find a way to fix it. Until then, use something else.
If you're using text DFMs (right click on the form, check "Text DFM", save), you can use Search|Find in Files to find all instances of Persistence in your DFM files. Just set the search string to "Persistence" (I usually tell it to ignore case), the file mask to "*.dfm", and check the "All files in project" checkbox.
If you're not already using text DFMs and don't want to manually open all forms and check the box and then resave them, you can use CONVERT.EXE (in the ($DELPHI)\Bin folder) to convert them en-masse. Run CONVERT with no parameters from any command prompt to see the options. By default, CONVERT will save .DFM as .txt, but you can have it work in-place (rewriting the binary .DFM as the text .DFM) by using the -i switch. (I usually back up the .DFMs to a different folder first, then convert them. If no errors are reported, I can then delete the backed up .DFMs later.)
I had similar problem with TMS when I upgraded to a new version:
If you think that some particular component is causing the problem,
delete it , compile project without it, place it on the form/frame again.
If that doesn't work for you:
Things you need to do in order to fix the problem , so you can use Designer and new properties, because that's what you really want , don't you ? :-) :
Uninstall TMS Component Pack ( or whatever you're using )
Re-Install TMS Component Pack
Build & Install the packages
Add appropriate TMS .lib files to your Application Project ( I'm using C++ Builder )
Add appropriate TMS .pas files to your Application Project . For example I had a problem with TAdvSmoothCalendar component , so I've added the AdvSmoothCalender.pas to my project.
Cheers!
I hope it works for everyone with a similar problem :)
I had similar problem with nuiGui Delphi Framework,
To Solve this, create a include file with some properties and use it in your class.
/// include class 'Basic.inc'
private
function GetWidth: Integer;
published
property ClientHeight : Integer Read FHeight Write FHeight;
//property ClientWidth : Integer Read FWidth Write FWidth;
//property OldCreateOrder : Boolean Read FOldCreateOrder Write FOldCreateOrder;
end;
...
/// main class like this
TuMemoFrame = class(TUniFrame)
UniMemo1: TUniMemo;
UniMemo2: TUniMemo;
UniButton1: TUniButton;
procedure UniButton1Click(Sender: TObject);
private
public
{$Include Basic.inc } // <---
end;

How do I import an ActiveX control in BCB5 with tlibimp?

What are the required flags for tlibimp.exe to properly mimic choosing
'Component -> Import ActiveX Control -> Install'
in the Borland C++ Builder 5 IDE? I currently pass tlibimp an ocx and -L-, but there is a loss in funcionality when compared with results of importing it manually.
The command line depends on what the IDE is attempting..for example install a component as active x.
-A TypeLibrary file suffix (defaults to '_TLB', -A- : no
suffix)
-D Output directory
-F TypeLibrary Output filename (extension ignored)
-N C++ namespace name
-X OCX Wrappers Output filename (extension ignored - C++
only)
Switches: - (defaults are shown below)
-C- Generate C++ import file
-E+ Generate wrapper class for dispinterfaces (C++ only)
-G+ Expose namespace with 'using' statement
-H+ Generate IDE component wrappers for ActiveX Controls
-J- Generate CORBA IDL source file
-K- Generate Pascal CORBA Stubs and Skeletons
-L- Generate IDE component wrappers for OLE Servers
-O+ Generate CoClass Creator wrappers
-P+ Generate Pascal import file
-Q+ Generate 'Register' function for IDE components wrappers
-R+ Generate files for dependent typelibraries
-S+ Map HRESULT stdcall to safecall on dual interfaces (Delphi only)
-T- Map HRESULT stdcall to safecall on all interfaces (Delphi only)
-V- Generate Event wrappers for Server (C++ only)
-W+ Warnings in import file
-Yh Ignore the [Hidden] flag when importing
-Yr Ignore the [Restricted] flag when importing
-Yp Ignore the [PreDeclID] flag when importing
-Ya Combined -Yh -Yr -Yp
--
Michael
It turns out that functionality loss was due to the fact that the ocx file I was importing was not registered. The projects that used this activeX control still compiled without a problem, but were still flawed.
Registering the ocx with regsvr32 solved the problem.

Resources