midora Posted January 12, 2015 Share Posted January 12, 2015 I like to add more controls on the glass frame of the PrintIt dialog. The dialog derives from PdnBaseForm. This worked fine for buttons all the time. But there is an issue with other controls. The background of the editboxes is not opaque And the background of text is not transparent. The text itself not readable (see the bottom right corner of the screenshot). Is there any trick to solve this issue? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 13, 2015 Share Posted January 13, 2015 I recommend not doing this ... Windows just does not handle this well at all and you'll end up chasing your tail and become exhausted and frustrated. Buttons should work okay as long as it's a PdnButton because those all use DirectWrite now (and are specifically tuned to work on glass). Other custom controls, and especially TextBox, are going to drive you mad though. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
midora Posted January 13, 2015 Author Share Posted January 13, 2015 Windows just does not handle this well at all and you'll end up chasing your tail and become exhausted and frustrated. Buttons should work okay as long as it's a PdnButton because those all use DirectWrite now (and are specifically tuned to work on glass). Other custom controls, and especially TextBox, are going to drive you mad though. Yeah, that's why I asked. I spent some time already and as you said solving one thing breaks something else. But as it happens sometimes, asking triggers yourself and I figured out a solution working specific for NumericUpDowns. And that's enough in my case because I can put the appended label into the NUD as a unit. The basic idea is described here. Thanks for the advice. I agree that you should not missuse the frame to place anything there. But in this special case it makes sense (IMHO) to use the frame for these dedicated controls. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted January 13, 2015 Share Posted January 13, 2015 I'm not so worried about "misusing the frame" ... it's your UI, you should do what you think is best for it. I'm mostly concerned about the pain and suffering associated with getting GDI controls to work on glass. GDI tends to stomp the alpha channel. Hmm ... I'm curious though. I wonder if hosting the WPF TextBox would work well in the glass area? I'm not sure what the performance implications would be. Paint.NET 4.0 uses WPF's dependency property system, so it's already incurring maybe half of the performance cost of loading WPF. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
midora Posted January 13, 2015 Author Share Posted January 13, 2015 I have in mind that you told once that only the settings dialog uses WPF and you may remove this dependency. But I may remember wrong. Just from the point of the user experience, I prefer that application and plugins are using a similar interface. OK there are exceptions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.