Propriete AutoScrollMargin, how set a new Margin Height?

sitajony

Active Member
Licensed User
Hi, I would know how edit this propriete with Basic4PPC? I can use this propriete with Door library but how create a point?
door.SetPropriete("AutoScrollMargin","???") It'll be every time a string and not a system.point...
I want make an effect when we scroll the Form without use the scrollbar...
Thanks for your help and tell me if you don't understand...
 

agraham

Expert
Licensed User
Longtime User
Don't you need a Size not a Point for AutoScrollMargin. Here's both.
B4X:
   ObjArr1.New1(2) ' Door ObjectArray   
   ObjArr1.SetValue(0, 10, "System.Int32") ' X parameter
   ObjArr1.SetValue(1, 20, "System.Int32") ' Y parameter
   
   Obj1.New1(False) ' Door Object   
   Obj1.CreateNew2( "System.Drawing.Point" & Obj1.System_Drawing, ObjArr1.Value) ' new Point
   Msgbox(Obj1.RunMethod("ToString")) ' confirm it
   Obj1.CreateNew2( "System.Drawing.Size" & Obj1.System_Drawing, ObjArr1.Value) ' new Size
   Msgbox(Obj1.RunMethod("ToString")) ' confirm it   
   
   Obj2.New1(False) ' Door Object   
   Obj2.FromControl("Form1")
   Obj2.SetProperty2("AutoScrollMargin", Obj1.Value)
 

sitajony

Active Member
Licensed User
Thanks, in fact Door library can do almost everything :)
Yes it's system.size and not system.point for Margin Height/Width I misspoke...
Thanks again ;)
 

sitajony

Active Member
Licensed User
Hum I've a new problem, I would know how change the Scrollbar value from AutoScroll... Is it possible? I can't use the ScrollBar from ControlEx because I want up a lot or object when I scrolldown, I know that I can use a panel but I want a background image too with a lot of transparent control...
Thanks for your replies!

Edit: I think it's AutoScrollPosition... I'm verifing...
 
Last edited:

sitajony

Active Member
Licensed User
The scrollbar auto (AutoScroll)... It's ok, it work with AutoScrollPosition :) I'm using this for change the ScrollBar value when I click on a control who is on the bottom, when I click on it the scrollbar go to the same position of the control for a best view...
With the scrollbar from ControlEx we've to set on the _ValueChanged, which control move with the scrollbar and with a lot of control it's hard but with the AutoScroll we've not to set which control follows the scrollbar value, it's better...
 
Top