I’m trying to use the DateControl again. The DropDownIcon in Retina shows up rather large and not in the proper size. Is my code wrong from the Open event of the DateControl?
if self.BackingScaleFactorMBS = 1 then
dim p as new Picture(16, 16)
p.Graphics.DrawPicture(calendar, 0, 0, p.Width, p.Height, 0, 0, calendar.Width, calendar.Height)
me.DropDownIcon = p
else
dim p as new Picture(32, 32)
p.Graphics.DrawPicture(calendar_retina, 0, 0, p.Width, p.Height,0, 0, calendar_retina.Width, calendar_retina.Height)
me.DropDownIcon = p
end if
Apple makes me want to hit somebody because they can’t even manage a “Save as” anymore. Had to change the size of the files and overwrote the originals. Xojo is less awful, but not really good: after dropping a 16x16 into a 24x24 image from an image set I get a lovely error message. Deleted the image set and created a new one.
And the DateControl removed the image set from the selection but still showed the icon in the IDE.
I am guessing your somehow setting up your imageset or images wrong, in first test then I get this here when putting custom image using Image set. One image is 16 x 16 (72 dpi) the other 32 x 32 (72 dpi), and I also got the 3x 48x48 (72 dpi)
Code to set the image is just:
Sub Open() Handles Open
me.DropDownIcon = MyCalendarImage
End Sub
Where MyCalendarImage is a ImageSet in the Xojo designer.
I would think it cannot work. Their whole automatic mechanism is built around the Image sets.
Though if you can make it work then I would think you should skip making the images there in between and just do
(Not terribly likely that the bellow would work though)
if self.BackingScaleFactorMBS = 1 then
me.DropDownIcon = calendar
else
me.DropDownIcon = calendar_retina // Could experiment having this one 144 DPI if it does not work at 72
end if
Am not sure though why you cannot use ImageSets, I believe you can also build them in pure code if the reason would be getting the picture from dynamic source, database or something.
I’ve got a >50kloc application that has been Retina capable for years. Changing to Xojo Retina requires a big change. When I enable HiDPI in the IDE just opening a window gives me a nice crash.
VM Regions Near 0x4:
–>
__TEXT 0000000000001000-0000000001c45000 [ 28.3M] r-x/rwx SM=COW /Users/USER/Documents/*/Mail Archiver X.app/Contents/MacOS/Mail Archiver X
Are you using 6.5.1 ? or 6.5 ? (6.5 had similar crash log wise).
If your using 6.5.1 then can you please drop on me simple example. Or when you say sheet do you then mean the Dialogs that show up like drawer from the window ?
On the retina thing then there is slight chance I can enable old style Retina for you. Mixing the old way and new way turned out to be horrible in control like TreeView but for control like the DateControl where its actually just one icon it might be not so bad to have old style Retina Image property.
Crash issue has now been resolved in 6.5.2. (And a new property was added to support users who are still stuck with old style Retina before time of ImageSet)
you still can force the IDE to add “Pictures” to a project even with HiDPI on but then you have to manually do all the work to sort out what image to use at runtime
There IS an issue with the IDE and images at design time when it comes to plugins that we have yet to resolve
<https://xojo.com/issue/43174>
The issue was not that though Norman. The issue was that our plugin only had one property for the image which is great in New Xojo that has ImageSet’s but before Xojo supported officially retina then those users need 2 properties for it.