This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Zoom with wheel and cut picture

 
Sylvain Prodo
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
The following code should permitt to move a big picture (eg: 20 000 x 20 000 and 10 MO ) by drag and drop or with arrows of the keyboard, to zoom in and zoom out whith wheel of the mouse. there are some problems:
_arrows zoom ! 8-| instead of move the picture (what I have made wrong?)
_when dragging and droping we can see that picture is cut: we can't see the whole image, but only the part of the picture initially present on the main Frame, others parts are white
_the zoom with the mouse enlarge the high left corner of the picture... :-(
_I've try to place some panels, but they don't appear on the Frame: there is only the picture...
If somebody can help me...
thanks


 
Bartek Myszkowski
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I understand that You don't want scrolbars but I still think that JScrollPane is the best solution for this. You can hide scrollbars withand there won't be any scrollbar. After this You should make some kind of connection between Your drag&drop function and viewport of scrollpane.. and again I post this link
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic