Solved

Scrolling in Tdbimage and Timage Components

Posted on 1998-04-26
13
315 Views
Last Modified: 2010-04-06
I am Trying to figure out how to get A scrollbar or scrollbox to scroll an image that is to big to fit in a Tdbimage. At the moment it scrolls the entire component around my form not the image inside the Component. I dont want to use Stretch to view the image. I need to be able to scroll the entire image about in the box. Can anyone help please.
michael.ross@cableinet.co.uk
Cheers Mike Ross.
P.s. This is my third week with Delphi so if possible can you include some code Please.
Depending on the answer I may increase the points.
0
Comment
Question by:pedro1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
13 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 20 total points
ID: 1337046
Hi Mike,

Why not this ? :

 Place a TScrollbox on the form and place a timage (tdbimage) into the scrollbox?

Regards, Zif.
0
 

Author Comment

by:pedro1
ID: 1337047
I put the tdbimage onto the scroll box but how do I connect the scrollbox to the image.
Ive searched the helpfile and it does not help.

P.s. Ive also bought 5 books in the past three weeks and they dont help either.
michael.ross@cableinet.co.uk
Cheers
Mike Ross
(P.s.s By the way i still cant find next in my database.)
0
 

Author Comment

by:pedro1
ID: 1337048
Please Ignore this Last Comment.
Only one problem left now. How do I get it to automatically set the range for a image on inserting it, so that scroll bars only appear when needed.
Cheers Mike Ross.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:ZifNab
ID: 1337049
Hi Mike,

With the TdbImage you could use the Ondatachange of your datasource...

What do you mean with "can't find next in my database?").

Regards, ZIF.
0
 

Author Comment

by:pedro1
ID: 1337050
From: ZifNab Date: Thursday, April 23 1998 - 03:01AM PDT  
 
Hi Mike,

Locate is designed for finding the 1st record matching the search criteria, So it will ALWAYS start from the first record of the table.

Instead you could use the functions FindFirst and then FindNext.

Regards, ZiF.
 
This is what I meant. You tried to answer a previous question of mine. I could not figure out how to use find in the database before find next.
 By the way Unless i put in a range for The Tdbimage it does not scroll my picture. So inserting an image does not affect the range of the scroll box.
Cheers Mike Ross.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337051
? Which version of D are you using?

Go to help topics, fill in FindNext and go to FindNext method....

There it is...

Regards, Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337052
Pedro1, you don't always have to accept the answer, you also can reject it! Regards, Zif.
0
 

Author Comment

by:pedro1
ID: 1337053
I still cant get the tdbimage to resize according to what is iserted into it so that the scrollbox automaticaly brings up scrollbars if needed. I still need to set a predefined size!!
how can I fix this please???
Cheers Mike Ross
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337054
Mmm, I see the problem is bigger then I thought.... I'll look after it, you can also look at this :

http://members.tripod.com/~rublin/

Zif.
0
 

Author Comment

by:pedro1
ID: 1337055
These components were not quite what I needed. Sorry.
How are you doing with the problem Ive set forth?
Cheers Mike Ross.
p.s Any pointers as to what I could look at to solve this problem???
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337056
I think I found something here, but I can't reach this site anymore... Maybe you?
http://www.warpgroup.com/delphitips/
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337057
Hi mike,

The only way so far I could get the scrollbars was this way :

Put a TScrollbox on the form. Put a TdbImage in the TScrollbox (Put it on position 0,0). Set the Align of tdbimage to NONE. Then change the width and height of the TDBImage to bigger value than these of TScrollbox. Now you get the scrollbars working.

If you change the align to any other you never get the scrollbars working in the scrollbox.

Keeping you in touch.

ZiF.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337058
I think I found something here, but I can't reach this site anymore... Maybe you?
http://www.warpgroup.com/delphitips/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question