Solved

Scrolling in Tdbimage and Timage Components

Posted on 1998-04-26
13
277 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 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now