-2

in the IDE the TDateTimePicker looks quite well, and it has a calendar icon. However, with VCL Style Hooks, there is no icon and the dropdown button looks quite ugly. See the VCL Hooks demo app.

In the IDE it looks like:

enter image description here

With VCL styles it looks like:

enter image description here

What can I do so that it looks reasonable with Styles?

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
BavDev
  • 1
  • 1
  • What do you mean by "in the IDE"? – Jerry Dodge Jul 29 '15 at 18:34
  • We need to know which version of Delphi you use, and we need a screenshot. Post it to an image sharing site and we'll edit it in. – David Heffernan Jul 29 '15 at 18:40
  • 2
    Maybe this helps: https://theroadtodelphi.wordpress.com/2014/11/04/vcl-styles-utils-major-update-dialogs-progressbar-datetimepicker-listview-and-more/ – Uli Gerhardt Jul 30 '15 at 05:09
  • @Jerry: I believe every Delphi programmer knows what I mean by "in the IDE". My question was intended for Delphi experts... – BavDev Jul 30 '15 at 10:18
  • @David: I am using DXE5. In the IDE it looks like www.sportsoftware.de/test/TDtP_IDE.bmp and with VCL styles it looks like www.sportsoftware.de/test/TDtP_Style.bmp Just look into the VCL Styles Hooks Demo and compare the appearance in the IDE vs. the running app. – BavDev Jul 30 '15 at 10:22
  • @Uli: I wrote that I am using VCL Style Hooks and of course the latest version of it. Actually I hoped that Rodrigo Ruz himself would answer here... – BavDev Jul 30 '15 at 10:23
  • @BavDev Sorry, that wasn't clear to me. – Uli Gerhardt Jul 30 '15 at 10:50
  • Your question does not state the version of Delphi, nor the version of the style hooks. It is rude to say that you only want help from experts. I respectfully suggest that you first look after the matters in your control and write a better question. Please read the site help for guidance. – David Heffernan Jul 30 '15 at 10:55
  • Of course I know what an IDE is. But the IDE itself doesn't have any `TDateTimePicker`. That's a VCL control which is installed into the IDE to be used in a project. "In the IDE" would mean that in the actual Delphi IDE somewhere is a place where you can change a date/time, which even if there was such a place, has nothing to do with using a `TDateTimePicker` in your project. What you probably meant to say was "In a project which does not use VCL Styles". I may have had your answer but lost all motivation to help you with that rude comment. – Jerry Dodge Jul 30 '15 at 13:00
  • Hello, I am quite disappointed about such rude and not helpful comments. I have stated that I am using DXE5 and the latest version of the VCL styles hooks. DXE5 = Delphi XE5. And of course only real experts can help me with that question, otherwise I would have found the solution myself. So, please be more constructive and help me! With constructive, I mean that you could follow my hint and simply look at the demo I mentioned several times. Or best, try to reach Rodrigo Ruz. I did not find any address where I could contact him personally. Sorry that I sound a bit angry now... – BavDev Jul 30 '15 at 13:06
  • I don't see how we are being rude. Uli Gerhardt already provided a link with info describing your situation and what's required to fix it. How do you expect to tell me I'm not an expert and not get a response? If we were being paid to help you, that's fine. But that's not how you speak to people who are trying to help you for free. – Jerry Dodge Jul 30 '15 at 13:17
  • 1
    In the link above: "*The Styling of the TMonthCalendar and TDatetimepicker components is one of the limitations of the VCL Styles, because such components are owner-draw by the system and doesn’t allow to customize the look and feel when the native themes are enabled (for more information read these TMonthCalendar and TDatetimepicker ) also only the newest versions of Delphi includes a partial styling support for such components. With this new release the styling of these controls is now possible.*" – Jerry Dodge Jul 30 '15 at 13:18
  • Also, did you see this? http://stackoverflow.com/questions/10335310/style-properties-for-tdatetimepicker – Jerry Dodge Jul 30 '15 at 13:26
  • I repeat: I am using the latest version of VCL Styles hooks and I know all that what you mentioned above. More, the question to which Jerry was referring, is outdated because the TDateTimerPicker hook unit is deprecated. Please look at the demo I mentioned and you will see the issue. Compare what you see in the IDE and what you see in the running app. Why do you not do that? – BavDev Jul 30 '15 at 13:49
  • @Bav The question does not state any of that. Please edit it. And according to Rodrigo, the information you supplied, which was vague, is in any case not accurate. You are new here. We all know how the site works. Please let us help you. Please be more constructive in listening and responding to our advice. Please read the site help to learn how to ask better questions. – David Heffernan Jul 30 '15 at 16:47
  • As it stands, here is what is missing from the question: 1. A tag to indicate delphi version. 2. A screenshot. 3. A revision number of the VCL styles code that you are using. Please supply these in edits. Add a link to the image on a file sharing site and i'll inline it for you. – David Heffernan Jul 30 '15 at 16:51
  • Ok, now I've found the image links. I'll add them. – David Heffernan Jul 30 '15 at 16:57
  • I apologize if something I said set you off. I was just asking for clarification of your statement, which now I realize was a misunderstanding. I was under the assumption you were comparing running an app with VCL Styles versus running an app without VCL Styles, which is the logical comparison to do in your situation. However, you were actually comparing running your app with VCL Styles to what was showing in the form designer. You should never compare those two, as they are very rarely the same. Completely slipped my mind that might be what you were referring to until I saw the screenshots. – Jerry Dodge Aug 01 '15 at 06:26
  • Also, you wrote that you're "using VCL Style Hooks". That is a very vague statement. Yes, you mentioned this in your question, but didn't mention the exact library you were using. "VCL Style Hooks" is a general concept in Delphi, which I've written a couple myself. Has absolutely no relation to the library you were using, which was only revealed later in the comments. The library you were referring to is unfortunately named the same as a general concept in Delphi, hence the added confusion. – Jerry Dodge Aug 02 '15 at 07:06

1 Answers1

3

It' seems which you are no using the latest version of the library.

This is the TDateTimePicker with the native Windows Style

enter image description here

With Vcl Styles

enter image description here

With the Vcl Styles Utils (just adding the Vcl.Styles.Hooks unit)

enter image description here

RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • Hello Rodrigo, thank you for this very first productive answer in this thread. I was not aware that there is a brand new version which is 5 days old. However, this does not solve the problem. I am testing your demo app and there is still the same ugly appearance. I checked several styles and it is the same in all styles. Can you check if this is an issue of DXE5 and it will be perfect in DXE8? I don't have any other idea. Or even an issue of Win8.1? – BavDev Jul 30 '15 at 20:33
  • I tested in XE5 and works just fine , maybe there is a old copy of the library installed in your system, Check the path of the files which are referenced in the project. – RRUZ Jul 30 '15 at 20:45
  • @BavDev The link above which I was talking about (in the 3rd comment on your question) is the very same one which was just updated 5 days ago. – Jerry Dodge Jul 30 '15 at 22:02
  • @Bav Your attitude is terrible. You've had nothing but constructive help from all quarters. On the other hand you have been offensive and rude. – David Heffernan Jul 31 '15 at 05:42
  • Hello Rodrigo, thank you for that valuable hint! Finally I found that the problem were old DCUs left in some subfolder of the demo apps. Thanks to Emba who invented this new kind of saving DCUs into some subfolders of the app source, which results in multiple redundant (maybe different) DCUs of the lib units... ;-) Now it works on my side. But continue reading with the BUTs in the next comments... – BavDev Jul 31 '15 at 07:00
  • First BUT: This is not the same with all styles. F.ex. with Iceberg Classico the button now has this icon but it still looks that ugly. A nice appearance would be like you have in your screenshot: the button is completely inside the edit field and the frame around the edit field is around the button. With most other styles the button still covers the frame border of the edit field which looks not professional. – BavDev Jul 31 '15 at 07:01
  • Second BUT: Another example is the Metro style. Green looks nice while with Black and Blue the icon disappears when you move the mouse over it. And finally, if you use the long date format, the button still has no icon and looks ugly. You have both in your demo app below each other, just look at that with different styles... – BavDev Jul 31 '15 at 07:02
  • @Rodrigo Thank you very much! Finally you directed me to the right place where it would have been better to ask that. I did not know that... – BavDev Jul 31 '15 at 14:41
  • @Jerry and David I was asking a question for which I did not find a solution elsewhere. I appreciate very much that you take your free time to support others here. However, you seem to have so much free time that you can make so much unhelpful noise only to be top in the forum statistics. For me, this question was for my business and you have to understand that I do not want to stress my nerves and to consume any time with that noise. Finally, the only person who can judge if a comment was helpful for me, this am me only. – BavDev Jul 31 '15 at 14:46
  • @ Jerry especially The very first comment on this question was "what is an IDE". To me this sounded like either this person Jerry has no glue of Delphi or he is holding me for stupid. You made much noise about that but the only one who could feel offended by that behaviour, this am I. – BavDev Jul 31 '15 at 14:48
  • @BavDev I don't understand why you continue to speak this way. I did not say "What is an IDE". I asked you What do you mean by "In the IDE" (your own words). – Jerry Dodge Jul 31 '15 at 15:13
  • @Bav Everyone here has been helpful. You've clearly not understood that for some reason. That's 100% on you. – David Heffernan Aug 01 '15 at 10:03