Wednesday, December 21, 2005

D2006: From the component has a new property file... TTrackBar

Finally TTrackBar uses can rejoice; you can now remove the range selection appearance of the TTrackBar.

Just set the new ShowSelRange property to FALSE. It is set to TRUE by default to keep the ugly trackbar users group in session (or it might have something to do with backwards compatibility).



Pick the odd one out...

D2006: Some of my Delphi 2006 examples

You can download some Delphi 2006 applications that I've written from the following code central url.

http://cc.borland.com/Author.aspx?ID=205627

Note that some are duplicated as some were done for Delphi 2006 and Delphi 2005. The first 4 items in the grid are for Delphi 2006.

Popup Message Notifier- Simple implementation of the Outlook notification dialog. This new version is themes aware and drops a number of caption properties that were present in previous versions. Definite enhancement over the previous version and used within JED, QC.

Runs Compact Framework Application- This is a Compact Framework application that will run on the Compact Framework. Creating this application is what drove me to create Compact Framework Build Helper as working with the Compact Framework and the IDE drove me nuts. I actually wrote the initial version in C# and visual studio before porting and completing it with Delphi. Needs some work (I should really use a dataset instead of a generic XML file) but what you can download is about 1/6 of what it will become. Yes they are my running shoes in the splash screen - size 15!

TFlowPanel Demo Application
- Don't worry about downloading this one. It is already on your system (if you have Delphi 2006 installed).

Bookmark Viewer- Update to my Bookmark viewer from Delphi 2005. Includes support for the C++Builder personality now. I have plans for some significant changes for this add in but apparently you can't lease anymore time in a day.

Wednesday, December 14, 2005

JED, QC: Gets the SuperTooltip Treatment

Here are a couple of screenshots of the next release of JED, QC.

I enjoy reading Jensen Harris' blog. You might see some influence in the screenshots displayed below .

Many features are displayed in the screenshots, including Images, Footers, Headers, Disabled commands with alternate descriptions as well as designtime support. There is also a component editor that lists all available actions in a tree and you can apply SuperTooltips to those actions by setting properties on the right.




















Tuesday, December 13, 2005

D2006: New StrictDelimiter property

The TStrings class has had a new property added to it in Delphi 2006. This new property is called StrictDelimiter.

Previously if you wanted to import a CSV (comma separated file) into your Delphi application using the CommaText property on a TStringList object you had to modify the output generated from popular spreadsheet applications.

This was because some spreadsheet applications don't quote ("") items when they contain a space in the text, nor should they have to, the comma is the delimiter not the space. Finally this issue has been solved in Delphi 2006 by the addition of the StrictDelimiter property.

The property is False by default to ensure backwards compatibility.

Example Usage:

Generated with HyperDelphi

procedure TfrmMain.bLoadClick(Sender: TObject);
var
slTemp: TStringList;
begin
slTemp := TStringList.Create;
try

// load the test string into the stringlist
slTemp.CommaText := eTestString.Text;
// load the commatext value of the stringlist into the first memo
mStrictDelimiterFalse.Lines.Text := slTemp.CommaText;
// clear the previous contents of the stringlist
slTemp.Clear;
// turn on the StrictDelimiter property
slTemp.StrictDelimiter := True;
// load the test string into the stringlist
slTemp.CommaText := eTestString.Text;
// load the commatext value of the stringlist into the second memo
mStrictDelimiterTrue.Lines.Text := slTemp.CommaText;
finally
slTemp.Free;
end;
end;





Example Output:



Verify how in the first memo the three four text have a comma separating them. In the second memo, you now see that three four are grouped together. I know I consider the second memo to contain the results I want.

CFBuild: Delphi 2006 Version

I have uploaded a Delphi 2006 version of the Compact Framework Build Helper. It is a preview version because it still contains some references to Delphi 2005 and I am currently working on some enhancements.

http://www.jed-software.com/preview/CFBuildHelper100.exe

This download does not include documentation. If you want the documentation download this zip file.

http://www.jed-software.com/preview/CFBuild2005Docs.zip

Look for the official release before the end of the year.

Tuesday, December 06, 2005

D2006: Designtime Components support different image sizes

Ever since the Delphi tool palette supported different button sizes the images on the Tool Palette where stretched. This unfortunately didn't look the best. This issue has been addressed in Delphi 2006.

You can now name your component image resources with a 16 or 32 after them to indicated that the image is to be used when displaying the Tool Palette in small or large button sizes.

For consistency if the images resource name is the component name then that image is used for the medium button size. This image is also used for the Form Designer. If the component name resource cannot be located then the default image is loaded, even if you have a 16 and 32 image specified.

Things always go better when you show some pictures so here you are:

The dcr file was built with the following script and compiled with brcc32 (from the bin folder of your installation).

TSomeComponent16 BITMAP TSomeComponent16.bmp
TSomeComponent BITMAP TSomeComponent.bmp
TSomeComponent32 BITMAP TSomeComponent32.bmp





























This also works with VCL.NET packages.

D2006: Add New menu item in Project Manager context menu

One of the many new features in Delphi 2006 (and perhaps lesser known) is the appearance of an Add New menu item in the Project Manager context menu.

When selected in a Win32 application you get a submenu that allows you to add either a New Form or a New Unit to the project. A very nice little shortcut for adding new units and forms to projects.

I like this new feature a lot personally.

Unfortunately it does have a couple of issues.
  1. For .NET applications and packages it only displays the Other and Customize menu items.
  2. The Customize menu item doesn't allow you to actually Customize the Add New menu but is a link to customizing the File File submenu.

Don't fear. I have QC'd both items already although they aren't visible yet.