Page 2 of 4
Posted: Tue Oct 19, 2004 3:47 am
by MrMat
The only minor problem i noticed is that if you put 2 or more gadgets on the window and then right click on Window_0 and select Delete Object then 1 of the gadgets is left.
Do you have plans to add alignment tools in the future? ie. it would be useful if you could select multiple gadgets and left/right/top/bottom align them, space them equally horizontally/vertically or centre them horizontally/vertically. If they could be moved a pixel by pressing the cursor keys would also be great. I don't want to pile up work for you though

Posted: Tue Oct 19, 2004 9:51 am
by freedimension
- pressing Escape to delete Gadgets would be fine
- You can resize the Tool-Windows width

- Resizing the Window should update the values in the "propiedades" (From where are you actually?)
- You should not only disable Properties but hide them (only my humble opinion). Example: min/max-values
- when minimizing/maximizing all windows should be affected. Actually you have to maximize each one manually
Posted: Tue Oct 19, 2004 10:04 pm
by zikitrake
Beach wrote: it would be nice to be able to associate the ".yav" files to the app so one could just double click the project file to bring up the project
ADDED!
MrMat wrote:The only minor problem i noticed is that if you put 2 or more gadgets on the window and then right click on Window_0 and select Delete Object then 1 of the gadgets is left.
FIXED!
MrMat wrote:Do you have plans to add alignment tools in the future?....
Yes!! yes!
FreeDimension wrote:
(FIXED!) - You can resize the Tool-Windows width
(FIXED! I think) - Resizing the Window should update the values in the "propiedades" (From where are you actually?)
(FIXED!)- when minimizing/maximizing all windows should be affected. Actually you have to maximize each one manually
I am studying your other options, but I don't know when they will be ready.
And.... other news:
-new gadget (ButtonImage)
- Bugs Fixed
http://usuarios.arsystel.com/mga2002/pb/yaPBVD.zip
Posted: Wed Oct 20, 2004 3:30 am
by PolyVector
@zikitrake...
Sorry if this is a bit off topic, but I recently found out about some undocumented WM_SYSCOMMAND params... They can be used to resize controls... Because windows is handling the resizing, it will act differently depending on the "Show window contents while dragging" setting...
Anyways, I found it interesting...
Code: Select all
#SC_SizeLeft = $F001
#SC_SizeRight = $F002
#SC_SizeTop = $F003
#SC_SizeTopLeft = $F004
#SC_SizeTopRight = $F005
#SC_SizeBottom = $F006
#SC_SizeBottomRigh = $F008
#SC_SizeBottomLeft = $F007
#SC_DragMove = $F012
SendMessage_(GadgetID(1),#WM_SYSCOMMAND,#SC_SizeRight,0)
You could probably just handle the #WM_LBUTTONDOWN event with one of these variations...
Posted: Wed Oct 20, 2004 1:01 pm
by zikitrake
Hi, PolyVector... and thank you.
I'm experimenting and I have a question:
Somebody knows how to draw the rectangle in steps of 5 (or 10, 20) pixels (for GRID SNAPPED function)
Code: Select all
#SC_SizeLeft = $F001
#SC_SizeRight = $F002
#SC_SizeTop = $F003
#SC_SizeTopLeft = $F004
#SC_SizeTopRight = $F005
#SC_SizeBottom = $F006
#SC_SizeBottomRight = $F008
#SC_SizeBottomLeft = $F007
#SC_DragMove = $F012
OpenWindow(0, 10, 10, 200, 250, #PB_Window_SystemMenu,"A Window")
CreateGadgetList(WindowID())
BTN_ID = ButtonGadget(1,30,30,150,200,"ClickMe and Dragme or Resizeme", #PB_Button_MultiLine)
Repeat
EventID.l = WaitWindowEvent()
If EventType() = #PB_EventType_LeftClick
SendMessage_(BTN_ID, #WM_SYSCOMMAND,#SC_SizeBottomRight,0)
EndIf
Until EventID = #PB_Event_CloseWindow
Posted: Wed Oct 20, 2004 1:14 pm
by freedimension
zikitrake wrote:Hi, PolyVector... and thank you.
I'm experimenting and I have a question:
Somebody knows how to draw the rectangle in steps of 5 (or 10, 20) pixels (for GRID SNAPPED function)
Rectangle == Windows?
There are Messages that can handle the resizing and moving of windows:
#WM_SIZING
#WM_MOVING
With these you get a pointer to a RECT Structure that you can alter to the values you need.
But, like PolyVector indicated already, if you have "Show window contents while dragging" checked, it will behave different, at least with #WM_MOVING.
Common workaround is to disable this feature for the time of Resizing/Dragging (IMHO even Photoshop does it this way). But this needs thorough programming, as users don't like their system settings to be altered permanently.
Code: Select all
Drag.l
SystemParametersInfo_(#SPI_GETDRAGFULLWINDOWS,0,@Drag,0)
...
...
...
SystemParametersInfo_(#SPI_SETDRAGFULLWINDOWS, Drag, 0, #SPIF_SENDWININICHANGE)
Posted: Wed Oct 20, 2004 1:21 pm
by MrMat
This works but there may be a better method:
Code: Select all
#SC_SizeLeft = $F001
#SC_SizeRight = $F002
#SC_SizeTop = $F003
#SC_SizeTopLeft = $F004
#SC_SizeTopRight = $F005
#SC_SizeBottom = $F006
#SC_SizeBottomRight = $F008
#SC_SizeBottomLeft = $F007
#SC_DragMove = $F012
Global OldButtonProc, GridSize
GridSize = 40
OpenWindow(0, 10, 10, 200, 250, #PB_Window_SystemMenu,"A Window")
CreateGadgetList(WindowID())
BTN_ID = ButtonGadget(1, 30, 30, 150, 200, "ClickMe and Dragme or Resizeme", #PB_Button_MultiLine)
Procedure ButtonProc(hWnd, uMsg, wParam, lParam)
result = 0
If uMsg = #WM_SIZING
*Size.RECT = lParam
*Size\right = *Size\left + GridSize * Int((*Size\right - *Size\left) / GridSize)
*Size\bottom = *Size\top + GridSize * Int((*Size\bottom - *Size\top) / GridSize)
result = #True
Else
result = CallWindowProc_(OldButtonProc, hWnd, uMsg, wParam, lParam)
EndIf
ProcedureReturn result
EndProcedure
OldButtonProc = SetWindowLong_(BTN_ID, #GWL_WNDPROC, @ButtonProc())
Repeat
EventID.l = WaitWindowEvent()
If EventType() = #PB_EventType_LeftClick
SendMessage_(BTN_ID, #WM_SYSCOMMAND, #SC_SizeBottomRight, 0)
EndIf
Until EventID = #PB_Event_CloseWindow
Posted: Wed Oct 20, 2004 6:35 pm
by zikitrake
Beach wrote:Oh, and it would be nice to have a repeat loop option with all the gadgets for lazy folks like me...

ADDED!
Now yaPBVD generate an Auto Loop File... if you want
http://usuarios.arsystel.com/mga2002/pb/yaPBVD.zip
Posted: Wed Oct 20, 2004 7:33 pm
by Beach
Oh yeah! Thanks zikitrake!
Posted: Wed Oct 20, 2004 8:37 pm
by MrMat
It's really good!
A few minor bugs:
The tree view is cut off at the bottom of the left window (Win XP).
If you right click on a string gadget, every second click you can get a popup menu appear with 'undo, cut, copy, paste, etc.' and then you can change the text eg. 'string_0' that appears in the gadget.
If you resize a window as small as it will go (dragging from the bottom right hand corner), let go of the mouse, then enlarge it again, it has a completely black background (only when the grid is displayed).
If you select a gadget and then click inside a string gadget in the left hand window the wrong cursor appears until you move the mouse.
Selecting WindowCentered hides the gadgets in the window.
Selecting Window_0 doesn't change the properties gadget (but it works if you click the background of the window).
If a gadget is under or on top of another gadget then the corner resizing box isn't visible (but it can still be resized).
When resizing the window using the width and height boxes there is a minimum size but when resizing the window manually there isn't.
Posted: Fri Oct 22, 2004 5:11 am
by zikitrake
MrMat wrote:It's really good!
A few minor bugs:
1- The tree view is cut off at the bottom of the left window (Win XP).
2- If you right click on a string gadget, every second click you can get a popup menu appear with 'undo, cut, copy, paste, etc.' and then you can change the text eg. 'string_0' that appears in the gadget.
3- If you resize a window as small as it will go (dragging from the bottom right hand corner), let go of the mouse, then enlarge it again, it has a completely black background (only when the grid is displayed).
4- If you select a gadget and then click inside a string gadget in the left hand window the wrong cursor appears until you move the mouse.
5- Selecting WindowCentered hides the gadgets in the window.
6- Selecting Window_0 doesn't change the properties gadget (but it works if you click the background of the window).
7- If a gadget is under or on top of another gadget then the corner resizing box isn't visible (but it can still be resized).
8- When resizing the window using the width and height boxes there is a minimum size but when resizing the window manually there isn't.
1- FIXED
2- FIXED
3- I CAN'T REPRODUCE THIS ERROR
4- FIXED
5- FIXED
6- FIXED
7- NOT YET, I WANT CHANGE RESIZING BOX METHOD
8- FIXED (CHANGED, NO MORE MINIMUM HEIGHT SIZE)
And the news
- Add ImageGadget
- Bugsfixed
http://usuarios.arsystel.com/mga2002/pb/yaPBVD.zip
Thank you for comments
Posted: Fri Oct 22, 2004 7:30 am
by gnozal
Excellent work
Could you add language support, so it could be translated ?
Posted: Fri Oct 22, 2004 8:15 am
by zikitrake
gnozal wrote:Excellent work
Could you add language support, so it could be translated ?
Yes!, I have thought to add it ... but later. (I speak Spanish and my (English) is very limited

Posted: Fri Oct 22, 2004 3:30 pm
by MrMat
Great work!
zikitrake wrote:3- I CAN'T REPRODUCE THIS ERROR

I can't reproduce it in the new version but sometimes when resizing the grid doesn't draw quite right:

Posted: Sat Oct 23, 2004 6:01 pm
by zikitrake
MrMat wrote:.. but sometimes when resizing the grid doesn't draw quite right
FIXED!, but it will appear in the next version. Now I am working with the Panelgadget (hard work

)
Can someone help me with this? viewtopic.php?t=12856