Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Scrolling in Tdbimage and Timage Components

Posted on 1998-04-26
13
Medium Priority
?
330 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
  • 8
  • 5
13 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 60 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses

877 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