ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageInfoText and ImageBottomText overlap
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stevenaertssen

Belgium
6 Posts

Posted - Mar 23 2016 :  04:30:09  Show Profile  Reply
Hi,

I upgraded to version 6.2.1 and have a problem in this version: ImageInfoText and ImageBottomText overlap in some cases.

I have a TImageEnMView with some thumbs and a Top-, Info- and BottomText. So far no problems. But when I save a snapshot to a stream and then load the snapshot in another TImageEnMView, the Info- and BottomText overlap. (See screenshots).




With earlier versions (not sure since which version this started), this used to work:




Could you please look into this?

Thx,

Steven

xequte

38947 Posts

Posted - Mar 28 2016 :  20:14:44  Show Profile  Reply
Hi Steven

Can you copy the TImageEnMView component from the form and paste it here for me (so I can see such settings as BottomGap). Also what method do you use to set the text for the thumbnails?


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

stevenaertssen

Belgium
6 Posts

Posted - Mar 29 2016 :  05:33:23  Show Profile  Reply
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
Go to Top of Page

xequte

38947 Posts

Posted - Mar 29 2016 :  20:20:01  Show Profile  Reply
Thanks Steven,

You can email me for the fixed source.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: