Solved

Scrolling in Tdbimage and Timage Components

Posted on 1998-04-26
13
307 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
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!

 
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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