johnrwsmith$
johnrwsmith

04/06/2007 :: 04:13

Anonyme

Hi all,

I'm using trial version of the gdpicture. following code works fine if I right click and select "area selection " mode from context menu but when I try to set the mode using the code, it does not anything:

'Code fragment #1:
'imgMain is my control name to gdpicture:

imgMain.setrectvalues 10 , 10 , 100 , 100

'Reading back, gives correct values
imgMain.getrectvalues x , y , w, h

'Here after, The code does not change the rect:
imgMain.MouseMode = MouseModeAreaSelection

imgMain.setrectvalues 10 , 10 , 102 , 100

'Reading back ...
imgMain.getrectvalues x , y , w, h

'..., gives just the old values: 10 10 100 100


Any comments ?
Loïc$2006306
Loïc

04/11/2007 :: 11:27

Registered

Hi,

If you try your code with a 100 % zoom your code will works.

Your new values are too close to the first.

You can try : imgMain.setrectvalues 10 , 10 , 110, 100


Best regards,

Loïc Carrère
back to forum