Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to load the tiff files in textbox control.
Posted
Comments
phil.o 26-Oct-15 5:16am    
That does not make any sense. A TextBox is meant to display strings, not images. That would be like asking "How can I go to the moon with my bicycle?". One would reply that you did not choose the right tool. Here is the same: you are trying to do something for which a TextBox control has not been designed. There are obviously better choices of control to display an image.
John C Rayan 26-Oct-15 5:30am    
Do you mean to say 'loading tiff file paths?' otherwise this question is nonsensical.
Ralf Meier 26-Oct-15 7:43am    
Do you want to display an Image (TIFF-File) inside your TextBox ?
If you are familiar to Controls-Development you could create your own customized TextBox-Control which could display an Image at a certain Position in your Control ...

1 solution

You can't, not in a human readable manner.
A textbox is just that: a box that contains and displays text. A TIFF file is a graphics format that contains little or no human readable text and which needs to be displayed in an Image container such as a PictureBox.

If you are trying to display the content of a TIFF file in a hexadecimal format that's possible, but it would be a lot of data (approximately the number of bytes in the file times three plus a line based overhead for the "address" within the file).
So if you have a 50KB TIFF file, you would be asking the user to look through 150~160 KB of hexadecimal text. Me? As a user I'd tell you to stick it! :laugh:
 
Share this answer
 
Comments
OriginalGriff 26-Oct-15 6:01am    
https://msdn.microsoft.com/en-us/library/system.windows.controls.image(v=vs.110).aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900