Since some days, my Delphi 2007 IDE has stopped formatting hint's text.
When the cursor moves over a class or a function, it displays hints as plain HTML text.
Syntax highlight is active and as far as I remember, I didn't change any option in the last months.
The only thing I can suppose is that, maybe, Windows 10 updates could have caused this problem but I'm not sure about that.
Related
In non-unicode Delphi (I've tried with D7 and D2006):
Put a TRichEdit on the form and run the application
Switch to some "exotic" keyboard layout (Russian, Greek, whatever)
Type something
On XP, everything is good and I can see normal Russian letters. However, on Win7 characters are wrong (accented letters from other languages). If I copy Russian text from MS Word and paste it to RichEdit, it looks OK.
I suspect it is something related to RichEdit control version, but it there any way to overcome it? If possible, I would like to avoid switching to TTntRichEdit (which appears to work correctly), as I would need to change lots of existing code.
Try to use converions like AnsiToUtf8 or AnsiToUnicode, when user presses a key.
A client is reporting an issue whereby she is copying from an e-mail into a screen in a program we have created with Delphi 5. The component on this screen to which she is copying is a TMemo component.
When a line of text contains an ellipsis (...) character or closing quotation marks character ("), the text is replaced with a vertical bar. If the text has two periods in a row, the periods appear correctly. When using the single quotation mark ('), the text appears correctly.
In testing this, I was able to replicate this issue from within an Outlook client and Word document. The error does not occur when copying text from within Notepad. The error also does not occur if I create the text from within the TMemo component, copy it into Outlook or Word, then copy it back into the component.
You are using Delphi 5 which is an ANSI version of Delphi. The characters that you are trying to copy do not exist in the ANSI character set that your client is using. There is no solution to this problem so long as you persist with ANSI controls. Your options:
Switch to a modern version of Delphi that supports Unicode, or
Use TNT Unicode controls with your legacy Delphi.
I am running Delphi 2010 on both a 64 bit windows machine (Win 7), and a 32 bit windows machine (XP).
I am trying to learn how to use the TRibbon control.
I have been following the example in Marco Cantu's 2009 Handbook and watching YouTube Demos, but my control is not working like that as explained in the book or demos.
I added two tabs, by right clicking the control. However, the TRibbon looked as exactly as it does in my screenshot, when i drop it on the main form. It is not as high as the ones in the books or youtube demos.
I have tried the same thing on my Win 32 laptop running Windows Xp and Delphi 2010 and get the exact same results
here is what it looks like on my machine
here is what it is suppose to look like in a demo
Once again. When it drop it on the form, it does not take the shape and height as that as i see in the demos. Even when i add tabs. Did i do something wrong during my Delphi 2010 installation?
I managed finally to reproduce the problem in Delphi XE (Update 1) on Win7 64 with Aero enabled. It seems that the size gets set wrong in the .DFM file, and because the Ribbon doesn't support manual resizing you can't visually fix it in the IDE (although it appears correctly at runtime) or in the Object Inspector. It occasionally appears correctly at runtime, but it seems that's sporadic as well.
It's a nasty bug, because it makes it impossible to design the Ribbon. You can add RibbonGroup items, and assign the ActionManager, and try and design it completely using the Structure Pane, but of course that's not a practical solution.
Fortunately, there's a pretty easy workaround, although it's annoying to have to do. :)
I managed twice to get the following workaround to function, but starting over it failed to work several times, so it's a possible way around it (no promises - worked in XE, consistently failed in XE2 Update 2):
Right-click on the Ribbon and add at least one tab.
Right click on the form in the IDE, and choose View as Text from the context (pop-up) menu.
Find the Ribbon control in the .dfm text, and change the Height from the 26 that the IDE assigned to 200. (The next step will adjust it, but that's fine - the 200 fixes the immediate problem.)
Right-click again, and choose View as Form, and the Ribbon should display correctly.
(I reported it in QC against XE2 Update 2, as the problem also exists there - QC #101642)
I traced it to TCustomRibbon.GetCaptionHeight, specifically
FCaptionHeight := Max(GetSystemMetrics(SM_CYCAPTION), 26);
It seems like the GetSystemMetrics call is returning something less than 26 on certain Win7 configurations (although I can't figure out why yet). There are a couple of commented lines in that method that seem to alter the result, but as I said they've been commented out.
The strange part is that in the TCustomRibbon.Create, the Height is set by a call to GetRibbonMetric(rmFullHeight), which sets the Result := cRibbonHeight + GetCaptionHeight;, and cRibbonHeight is a constant defined as cRibbonHeight = 117;.
Finally think I've tracked this down. In the declaration of TRibbon, there's a published property declaration:
published
...
property Height default TCustomRibbon.cRibbonHeight;
Because this is the default, it appears that any other value means that the call to GetRibbonMetric mentioned above doesn't happen (see the TCustomRibbon.Create mentioned above), and the strange result from the call to GetSystemMetric causes the erroneous value 26 to be saved as the 'other value`. Wierd; will update the QC in the AM.
Addendum: Updated QC report with additional details.
Addendum: QC report opened in May 2012, but does not appear to have been resolved as of XE5 Update 1 (checked Jan 2014).
I have lots of components installed - trouble is when I want to find one I rarely use it takes ages to find it. I can look at the ALL choice which lists all components but finding one with say 'grid' in the title is still very time consuming. Is there a database of titles or (preferably) a text file I could interrogate and search?
Try DDevExtensions 1.61, it add ability to search for components for Delphi from version 5 and above, with other many improvement for the IDE.
Which version of Delphi? In recent versions, just click on the top of the palette and type "grid". Ctrl-Alt-P will focus the palette, and then you can just start typing.
In RAD2009 and RS2010, do this and it'll find all components with "grid" anywhere in the title.
Since you didn't specify which version of Delphi...
1) In older versions (D7 and before), you can right click on the component palette to see the properties. This shows all of the components you have installed one page at a time. It isn't searchable, but at least the list shows each component's name and package, so it's easier than using the popup hints on each individual component.
2) In Delphi 7, you can select View|Component List, which brings up a searchable alphabetical list of all components. Unfortunately, it only matches on the first part of the component name. The first version of the "new" tool palette had this same limitation.
3) DDevExtensions (free) allows partial string matches in the old component palette (D5-D7), and restores something like the old palette in newer versions of Delphi (D2005 and up). It's also included in Delphi 2010 for people who prefer that style. I like how the search works in Delphi 7, but in Delphi 2010, the filtering seems a little awkward to me. It filters the components and palette pages, but if you have matching components on more than one page, they aren't all shown at the same time. You still have to click on each individual page.
4) My favourite. I prefer the new tool palette (Delphi 2005 and up). Very configurable, lets me see the component names, shows components on more than one page at a time, dockable, etc.
Bottom line. If you don't have or don't like the new tool palette, get DDevExtensions.
Before Delphi 2005: Install DDevExtensions, then choose Tools -> DDevExtensions Options -> Component Selector -> Check the "Active" box, click OK
Delphi 2005 and later: Click in the component palette and type the name of the one you want.
Use GExperts - they help a lot.
In a Delphi 2007 program I am using a TMainMenu referencing actions in a TAction list. I have prefixed the hotkeys of all main captions with an ampersand:
&File | &Edit | Ev&aluate | ...
In design view these hotkeys are underlined as I would expect, but when I start the program they no longer are underlined but they work nonetheless. In contrast to this, for all the submenu icons
&File
&New ...
&Open ...
the underline is shown as expected.
I am aware of the Windows pisplay properties option "Hide underlined letters or keyboard navigation until I press the Alt key." and have disabled it. In all other programs this works fine, including the Delphi IDE.
If I create a new VCL appliation and just add a TMainMenu and a few menu items, it works as expected.
This has me baffled, really.
Is there any property of the TMainMenu component or maybe an application option that I must change? The "Enable runtime themes" project option is grayed out for some reason, might that be the problem? If yes, what causes this?
This may not be a Delphi issue. I have just tried this with IE8 on WinXP. On my machine, with the display properties set to require the Alt key, the underlining works as expected. However, with the checkbox unchecked, the underlining never appears on the main menu items (even when using the Alt key), but always appears on the File,Edit,View etc submenus (as you describe) ........ unless Microsoft wrote IE8 in Delphi :-)
I asked the same question last year and there were some excellent answers:
Menu Accelerator Keys Not Showing Up Delphi 2009
In conclusion, it appears to be a Delphi bug, and I reported it to Embarcadero at:
http://qc.embarcadero.com/wc/qcmain.aspx?d=68816
However, they have no resolution to it, so unless others (maybe you) also complain, I don't expect it will get addressed.
Step's answer to my question refers to a possibly related bug reported on the Delphi forums:
ALT Key press causes controls to disappear under Themes in Vista and XP. This one is marked as "resolved" with several possible fixes listed in the comments. I have not had the opportunity to go through these.
By the way, since I asked that question last year, I got a new computer with Vista. The same problem still happens, even when the Vista Ease of Access Centre setting: "Underline keyboard shortcuts and access keys" is set. So the Delphi bug still exists.
I was very surprised to find the default was that this was unchecked. I guess in Vista, they want a cleaner looking menu with the assumption that not many people ever used the accelerator keys.
The easiest way to fix this problem seems to use TJvMainMenu from the jvcl instead of TMainMenu. I tried the current version 3.38, but it is possible that the problem was fixed already in earlier versions. Since I was using the jvcl anyway it does not add much to my program's size. Your mileage may vary though, the jvcl is a huge library.
Uses an empty image list for main menu, if it is possible. In this way you can force delphi to paint menu correctly. (But looks ugly in vista and w7)
Are you sure you don't have OwnerDraw set to true in the MainMenu?