Click here to Skip to main content
15,881,173 members
Home / Discussions / C#
   

C#

 
AnswerRe: Looping though Dataset Pin
Xmen Real 25-Feb-09 3:29
professional Xmen Real 25-Feb-09 3:29 
GeneralRe: Looping though Dataset Pin
kanchoette25-Feb-09 3:32
kanchoette25-Feb-09 3:32 
GeneralRe: Looping though Dataset Pin
Xmen Real 25-Feb-09 4:25
professional Xmen Real 25-Feb-09 4:25 
AnswerRe: Looping though Dataset Pin
PIEBALDconsult25-Feb-09 3:35
mvePIEBALDconsult25-Feb-09 3:35 
AnswerRe: Looping though Dataset Pin
ABitSmart25-Feb-09 3:35
ABitSmart25-Feb-09 3:35 
GeneralRe: Looping though Dataset Pin
kanchoette25-Feb-09 3:44
kanchoette25-Feb-09 3:44 
GeneralRe: Looping though Dataset Pin
ABitSmart25-Feb-09 4:10
ABitSmart25-Feb-09 4:10 
QuestionHow to add a ScrollBar where there is none? Pin
Megidolaon25-Feb-09 3:12
Megidolaon25-Feb-09 3:12 
I want to read an image and display its content in PictureBoxes.
The PictureBoxes get added dynamcally to a Panel (or is there a better control to keep them all together?) dpending on the image size.
The PictureBoxes all have a size of 32x32 pixels.

If you ever used an rpg maker, I'm trying to make some map maker wher you can see the source image on the left side, select a tile and then edit the map on the right side with it.

I have 2 problems, first and foremost I added a ScrollBar to the control and to the Controls property of the Panel.
Obviously nothing happens when you scroll, though you are supposed to be able to scroll up and down when the source image is too large to display at once.

How can I get the ScrollBar to make the Panel display a different part of the source image, whenever you scroll?

I thought of clearing the Controls property of the Panel and always just adding the visible PictureBoxes (they all are stored in an extra collection), determining which ones are visible by Panel and PictureBox size.
Though, this would need calculations and have to be pixel-exact, if possible I dould like to avoid this and use a more elegant way.

The second problem is that I have a for loop which is repeated once for image width/32 (8 times, I intend to have a fixed width of 256 pixels) and adds a PictureBox everytime (again, 8).
The problem is that 8.5 PictureBoxes are display in width, the half PictureBox seems to be downscaled version:
http://i43.tinypic.com/snhyjc.jpg[^]
AnswerRe: How to add a ScrollBar where there is none? Pin
Xmen Real 25-Feb-09 3:19
professional Xmen Real 25-Feb-09 3:19 
GeneralRe: How to add a ScrollBar where there is none? [modified] Pin
Megidolaon25-Feb-09 21:23
Megidolaon25-Feb-09 21:23 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 25-Feb-09 23:01
professional Xmen Real 25-Feb-09 23:01 
GeneralRe: How to add a ScrollBar where there is none? Pin
Megidolaon25-Feb-09 23:41
Megidolaon25-Feb-09 23:41 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 25-Feb-09 23:47
professional Xmen Real 25-Feb-09 23:47 
GeneralRe: How to add a ScrollBar where there is none? Pin
Megidolaon26-Feb-09 2:02
Megidolaon26-Feb-09 2:02 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 26-Feb-09 2:49
professional Xmen Real 26-Feb-09 2:49 
GeneralRe: How to add a ScrollBar where there is none? [modified] Pin
Megidolaon26-Feb-09 20:49
Megidolaon26-Feb-09 20:49 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 27-Feb-09 1:37
professional Xmen Real 27-Feb-09 1:37 
GeneralRe: How to add a ScrollBar where there is none? [modified] Pin
Megidolaon1-Mar-09 20:30
Megidolaon1-Mar-09 20:30 
GeneralRe: How to add a ScrollBar where there is none? Pin
Xmen Real 2-Mar-09 5:55
professional Xmen Real 2-Mar-09 5:55 
GeneralRe: How to add a ScrollBar where there is none? Pin
Megidolaon2-Mar-09 20:24
Megidolaon2-Mar-09 20:24 
AnswerRe: How to add a ScrollBar where there is none? Pin
Megidolaon6-Mar-09 1:11
Megidolaon6-Mar-09 1:11 
QuestionHow to Loop through this Arraylist Pin
Vimalsoft(Pty) Ltd25-Feb-09 3:03
professionalVimalsoft(Pty) Ltd25-Feb-09 3:03 
AnswerRe: How to Loop through this Arraylist Pin
Colin Angus Mackay25-Feb-09 3:14
Colin Angus Mackay25-Feb-09 3:14 
GeneralRe: How to Loop through this Arraylist Pin
Vimalsoft(Pty) Ltd25-Feb-09 3:29
professionalVimalsoft(Pty) Ltd25-Feb-09 3:29 
AnswerRe: How to Loop through this Arraylist Pin
PIEBALDconsult25-Feb-09 3:54
mvePIEBALDconsult25-Feb-09 3:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.