TC 4.2.1 ImageList problem
We have an ImageList in a ComboBox that works fine in TC 4.2.0, but is offset when testing on 4.2.1. We've noticed this both under Java, and on Android. The attached provides a screen shot, and the simple code used behind int.421-ImageListBug.docx
fwiw, the array of images is prefetched with this code:
private void loadImages() {
int imgCnt = 46; // number of images to load
String stImageBaseName = "OrdImage-";
String imgFileName;
imgs = new Image[imgCnt]; // create our array of images
double scaleFactor = 1.0;
for (int i=0; i<imgCnt; i++) { // now load up our images
imgFileName = stImageBaseName+i+".png";
try {
imgs[i] = new Image(imgFileName); // note that these must be SQUARE images
if (i==0) { // set up scaling
double charHeight3 = fmH * 3.0d; // make image 3 high and wide
scaleFactor = charHeight3 / imgs[0].getHeight();
}
imgs[i] = imgs[i].smoothScaledBy(scaleFactor, scaleFactor);
}
catch (Exception ioErr) {
Vm.debug("Error reading images: "+ioErr.getMessage());
}
}
}
Edited by Greg Ouzounian