Jump to content




mouse_drag and changing cell backgrounds


  • You cannot reply to this topic
4 replies to this topic

#1 Jasonfran

  • Members
  • 148 posts
  • LocationEngland

Posted 28 October 2012 - 02:26 PM

Can someone explain how the mouse_drag event works and to change the background of each cell on the screen do you have to set the cursor position for the cell then change the background? Because it seems a bit stupid if I wanted to draw a picture.

#2 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 28 October 2012 - 04:34 PM

View PostJasonfran, on 28 October 2012 - 02:26 PM, said:

Can someone explain how the mouse_drag event works and to change the background of each cell on the screen do you have to set the cursor position for the cell then change the background? Because it seems a bit stupid if I wanted to draw a picture.

See how the built in paint program works. How is it "stupid"?

#3 Jasonfran

  • Members
  • 148 posts
  • LocationEngland

Posted 28 October 2012 - 04:59 PM

Well instead of changing the background of the cell the cursor is on, can't you make it so it takes an x and y parameter and changes that cell. And if the x and y are blank, do what it does now.

#4 Jasonfran

  • Members
  • 148 posts
  • LocationEngland

Posted 28 October 2012 - 05:06 PM

Can't delete this after accidental double post

#5 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 28 October 2012 - 06:23 PM

Have you looked at the paintutils API to see if it has what you need? Even if it doesn't, it can be a three line function to do what you want.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users