Hi Nigel,
here is the components that is saved into the snapshot:
object imgView: TImageEnMView
Left = 0
Top = 61
Width = 806
Height = 483
Background = clWhite
ParentCtl3D = False
BorderStyle = bsNone
StoreType = ietThumb
ThumbWidth = 100
ThumbHeight = 100
HorizBorder = 10
VertBorder = 10
UpperGap = 4
TextMargin = 0
OnImageDraw2 = imgViewImageDraw2
OnImageSelect = imgViewImageSelect
OnImageDeselect = imgViewImageSelect
MouseInteract = []
GridWidth = -1
SelectionColor = clHighlight
RemoveCorrupted = True
Style = iemsFlat
ThumbnailsBackground = clWhite
ThumbnailsBackgroundSelected = clBtnFace
EnableMultiSelect = True
MultiSelectionOptions = [iemoRegion]
ThumbnailsBorderWidth = 0
ThumbnailsBorderColor = clBlack
DefaultBottomText = iedtNone
Align = alClient
PopupMenu = pmDummy
TabOrder = 0
OnDblClick = imgViewDblClick
OnEndDrag = imgViewEndDrag
OnMouseDown = imgViewMouseDown
OnMouseMove = imgViewMouseMove
OnKeyDown = imgViewKeyDown
end
Here is the component that is loaded from the snapshot (so in this compoment text is overlapped)
object imgOverview: TImageEnMView
Left = 894
Top = 126
Width = 180
Height = 586
Background = clBtnFace
ParentCtl3D = False
BorderStyle = bsNone
StoreType = ietNormal
ThumbWidth = 100
ThumbHeight = 100
HorizBorder = 4
VertBorder = 4
TextMargin = 0
OnImageSelect = imgOverviewImageSelect
GridWidth = -1
Style = iemsACD
ThumbnailsBackground = clBtnFace
ThumbnailsBackgroundSelected = clBtnFace
MultiSelectionOptions = []
ThumbnailsBorderWidth = 0
ThumbnailsBorderColor = clBlack
DefaultBottomText = iedtNone
Align = alRight
TabOrder = 0
OnMouseDown = imgOverviewMouseDown
end
Please note that some settings are done in code. This code is applied to both ImageEnMView components:
void __fastcall applyDentAdminVoorkeuren(TImageEnMView * imgView)
{
boost::scoped_ptr <TIniFile> iniFile(new TIniFile(SETTINGS_INI_PATH));
imgView->BorderStyle = bsNone;
imgView->Style = iemsFlat;
imgView->TrackMouseSelection = true;
imgView->StoreType = ietThumb;
imgView->Background = clWhite;
imgView->ThumbnailsBackground = clWhite;
imgView->ThumbnailsBackgroundSelected = 0xFFE8D1;
imgView->SelectedFontColor = clBlack;
imgView->SelectionColor = clHighlight; //TColor(0x00C56A31);
imgView->HorizBorder = 10;
imgView->VertBorder = 10;
imgView->SoftShadow->Enabled = DebugHook == 0;
/* SoftShadow enkel enablen als we niet debuggen. Gaat anders veel te traag.*/
imgView->ThumbHeight = iniFile->ReadInteger("PATIENTFICHE", "ImagingThumbnailSize", IMAGING_THUMBNAIL_SIZE_DEFAULT);
imgView->ThumbWidth = iniFile->ReadInteger("PATIENTFICHE", "ImagingThumbnailSize", IMAGING_THUMBNAIL_SIZE_DEFAULT);
// imgView->ParentCtl3D = false;
imgView->DefaultTopTextFont->Size = iniFile->ReadInteger("PATIENTFICHE", "fontsizeImagingImageName", FONTSIZE_IMAGING_IMAGE_NAME_DEFAULT);
imgView->DefaultInfoTextFont->Size = iniFile->ReadInteger("PATIENTFICHE", "fontsizeImagingImageTeeth", FONTSIZE_IMAGING_IMAGE_TEETH_DEFAULT);
imgView->DefaultBottomTextFont->Size = iniFile->ReadInteger("PATIENTFICHE", "fontsizeImagingImageDate", FONTSIZE_IMAGING_IMAGE_DATE_DEFAULT);
imgView->DefaultTopTextFont->Style = iniFile->ReadBool("PATIENTFICHE", "imagingImageNameBold", false)
? TFontStyles() << fsBold : TFontStyles();
imgView->DefaultInfoTextFont->Style = iniFile->ReadBool("PATIENTFICHE", "imagingImageTeethBold", false)
? TFontStyles() << fsBold : TFontStyles();
imgView->DefaultBottomTextFont->Style = iniFile->ReadBool("PATIENTFICHE", "imagingImageDateBold", false)
? TFontStyles() << fsBold : TFontStyles();
}
//---------------------------------------------------------------------------
This code is used to set the text:
void __fastcall AtxCustomImage::setImageText(int imageIndex, TImageEnMView* imageEnMView)
{
/* Als je deze methode vanuit een thread gebruikt moet deze in de synchronize staan
omdat deze methode het scherm gaat updaten.*/
imageEnMView->ImageTopText[imageIndex] = getDisplayName();
String tandNummerText = getTandNummersAsText();
imageEnMView->ImageInfoText[imageIndex] = tandNummerText.IsEmpty() ? String() : LoadStr(strTand1) + tandNummerText;
if (getCreationDate().Val != 0.0)
imageEnMView->ImageBottomText[imageIndex] = DateToStr(getCreationDate());
}
//---------------------------------------------------------------------------
Thx,
Steven