Just starting out? Need help? Post your questions and find answers here.
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri Apr 01, 2022 7:40 pm
RASHAD wrote: Fri Apr 01, 2022 6:35 pm
Hi Psychophanta
I hope that I just understood you correctly
After resize you can do what you want with the gadget
Code: Select all
Procedure SizeCB()
w = WindowWidth(0)
h = WindowHeight(0)
ResizeGadget(0,10,10,w-20,h-20)
EndProcedure
OpenWindow(0, 0, 0, 800,600, "test", #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
ScrollAreaGadget(0, 10, 10, 780,580 , 2000,1500, 30)
;add some other gadgets...
CloseGadgetList()
BindEvent(#PB_Event_SizeWindow,@sizeCB())
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Quit = 1
Case #PB_Event_Gadget
Select EventGadget()
Case 0
Select EventType()
Case #PB_EventType_Resize ;The gadget has been resized.
SetGadgetAttribute(0, #PB_ScrollArea_X, 2000)
hpos = GetGadgetAttribute(0, #PB_ScrollArea_X)
SetGadgetAttribute(0, #PB_ScrollArea_Y, 1500)
vpos = GetGadgetAttribute(0, #PB_ScrollArea_Y)
SetGadgetAttribute(0, #PB_ScrollArea_X, hpos/2)
SetGadgetAttribute(0, #PB_ScrollArea_Y, vpos/2)
EndSelect
EndSelect
EndSelect
Until Quit = 1
Again: you did not understand a thing.
Please do not try again to make to loss my time. I even uploaded a video showing it, so i think it is enought.
Thank you.
RASHAD
PureBasic Expert
Posts: 4951 Joined: Sun Apr 12, 2009 6:27 am
Post
by RASHAD » Fri Apr 01, 2022 7:50 pm
You are rude beside you did not understand what the event can do
RTFM carefully
Egypt my love
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri Apr 01, 2022 8:22 pm
Dear RASHAD.
Sorry my rudeness, but please try to watch the reason of it.
Again and again you are posting tips which have nothing to do with the issue
breeze4me
Enthusiast
Posts: 633 Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor
Post
by breeze4me » Fri Apr 01, 2022 11:42 pm
The following event is supported through EventType():
#PB_EventType_Resize: The gadget has been resized.
The above explanation has the following meaning.
#PB_EventType_Resize: This event occurs when the gadget has been resized by using ResizeGadget() function.
And this does not mean that the gadget can be resized by dragging a specific part of it.
The points mentioned above apply to all gadgets of container type.
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Sat Apr 02, 2022 5:33 pm
breeze4me wrote: Fri Apr 01, 2022 11:42 pm
The following event is supported through EventType():
#PB_EventType_Resize: The gadget has been resized.
The above explanation has the following meaning.
#PB_EventType_Resize: This event occurs when the gadget has been resized by using ResizeGadget() function.
And this does not mean that the gadget can be resized by dragging a specific part of it.
The points mentioned above apply to all gadgets of container type.
Nope, dear.
The above explanation has NOT that meaning.
mk-soft
Always Here
Posts: 6231 Joined: Fri May 12, 2006 6:51 pm
Location: Germany
Post
by mk-soft » Sun Apr 03, 2022 11:16 am
I don't see any code example from you and ...
You cannot change the size of the ScrollAreaGadget with the mouse. The size of the ScrollAreaGadget can only be changed with ResizeGadget(...). This must be done in the event #PB_Event_SizeWindow. (So like in my example)
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Mon Apr 04, 2022 8:11 am
mk-soft wrote: Sun Apr 03, 2022 11:16 am
You cannot change the size of the ScrollAreaGadget with the mouse.
That's all Folks