Form Designer 5.10
Re: Form Designer for Mac/Windows/Linux - beta 9
App crashes when moving the splitter to the right edge.
When moving it to the left edge there are drawing errors (whole area is white until I move the splitter back again).
When moving it to the left edge there are drawing errors (whole area is white until I move the splitter back again).
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: Form Designer for Mac/Windows/Linux - beta 9
On which OS?Shield wrote:App crashes when moving the splitter to the right edge.
When moving it to the left edge there are drawing errors (whole area is white until I move the splitter back again).
Re: Form Designer for Mac/Windows/Linux - beta 9
I've added the minimum size to the splitter to avoid the crash (though it doesn't crash on OSX).
Cannot reproduce the "drawing errors".
Cannot reproduce the "drawing errors".
Re: Form Designer for Mac/Windows/Linux - beta 9
It doesn't crash anymore when dragged to the right, but now it crashes when dragged to the left.
Windows 7 (x64) Home Premium

Windows 7 (x64) Home Premium
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Re: Form Designer for Mac/Windows/Linux - beta 9
Won't happen in next beta, thanks for reporting that, I hate apps that crash!Shield wrote:It doesn't crash anymore when dragged to the right, but now it crashes when dragged to the left.![]()
Windows 7 (x64) Home Premium

Re: Form Designer for Mac/Windows/Linux - beta 9
One doubt and one crash 
1- I selected an event file by mistake; I see that I can select another one easily, but I have not understood how to return to default (without any event file).
2- I could crash while resizing (reducing) the main window of FD.

Edit: it takes a large property area to cause the crash, no crash with small ones.


1- I selected an event file by mistake; I see that I can select another one easily, but I have not understood how to return to default (without any event file).
2- I could crash while resizing (reducing) the main window of FD.

Edit: it takes a large property area to cause the crash, no crash with small ones.

Re: Form Designer for Mac/Windows/Linux - beta 9
The resizing issue is probably linked to the min size of the splitter which should be fixed.
I though I had added a right click to remove the file (like the right click on colour) - but I apparently forgot!
Thanks
I though I had added a right click to remove the file (like the right click on colour) - but I apparently forgot!
Thanks

Re: Form Designer for Mac/Windows/Linux - beta 9
Gaetan,
you are right, it is the splitter; I can cause a crash if I move the splitter to the left.
CAUTION for beta testers, crashing FD moving the splitter to the left side may prevent FD from starting again , I had to remove preferences.
you are right, it is the splitter; I can cause a crash if I move the splitter to the left.
CAUTION for beta testers, crashing FD moving the splitter to the left side may prevent FD from starting again , I had to remove preferences.
Re: Form Designer for Mac/Windows/Linux - beta 9
The generated code spells Calendar as CalEndar.
I know PB isn't case sensitive so it will work fine but the capital E looks a bit strange.
I know PB isn't case sensitive so it will work fine but the capital E looks a bit strange.
Re: Form Designer for Mac/Windows/Linux - beta 9
Fixed, thanks!wilbert wrote:The generated code spells Calendar as CalEndar.
I know PB isn't case sensitive so it will work fine but the capital E looks a bit strange.

Re: Form Designer for Mac/Windows/Linux -5.00b2
"Set Gadget Font" is saved in the pbf files, but this command is lost when the file is open again in Form Designer.
See these two files as "before" and "after" :
As saved
After re-opening
here is my simple "events_test.pb" file which is included
See these two files as "before" and "after" :
As saved
Code: Select all
; Form Designer for Purebasic - 5.0
; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again.
Global Img_0
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_0
#Image_0
#TrackBar_0
EndEnumeration
Img_0 = CatchImage(#PB_Any,?img_0)
Enumeration
#Font_0
EndEnumeration
LoadFont(#Font_0,"Arial", 9)
XIncludeFile "C:\Programmi\PureBasic_500\events_test.pb"
Procedure InitWindow_0()
OpenWindow(#Window_0, 0, 0, 600, 400, "FORM TEST", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
ButtonGadget(#Button_0, 30, 30, 140, 60, "message request")
SetGadgetFont(#Button_0, FontID(#Font_0))
ImageGadget(#Image_0, 30, 100, 32, 32, ImageID(Img_0))
TrackBarGadget(#TrackBar_0, 240, 40, 190, 40, 0, 50, #PB_TrackBar_Ticks)
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_0
messaggio(EventGadget(),EventType())
Case #Image_0
messaggio(EventGadget(),EventType())
EndSelect
EndSelect
EndProcedure
DataSection
img_0: IncludeBinary "C:\Programmi\PureBasic_500\Examples\Sources - Advanced\Waponez II\Waponez.ico"
EndDataSection
Code: Select all
; Form Designer for Purebasic - 5.0
; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again.
Global Img_0
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_0
#Image_0
#TrackBar_0
EndEnumeration
Img_0 = CatchImage(#PB_Any,?img_0)
XIncludeFile "C:\Programmi\PureBasic_500\events_test.pb"
Procedure InitWindow_0()
OpenWindow(#Window_0, 0, 0, 600, 400, "FORM TEST", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
ButtonGadget(#Button_0, 30, 30, 140, 60, "message request")
ImageGadget(#Image_0, 30, 100, 32, 32, ImageID(Img_0))
TrackBarGadget(#TrackBar_0, 240, 40, 190, 40, 0, 50, #PB_TrackBar_Ticks)
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_Gadget
Select EventGadget()
Case #Button_0
messaggio(EventGadget(),EventType())
Case #Image_0
messaggio(EventGadget(),EventType())
EndSelect
EndSelect
EndProcedure
DataSection
img_0: IncludeBinary "C:\Programmi\PureBasic_500\Examples\Sources - Advanced\Waponez II\Waponez.ico"
EndDataSection
Code: Select all
Procedure messaggio(who.i,how.i)
If how=#PB_EventType_LeftClick
MessageRequester("Information", "LEFT click", #PB_MessageRequester_Ok)
EndIf
EndProcedure
Re: Form Designer for Mac/Windows/Linux -5.00b2

Fixed.
This problem only occurs when PB_Any is not used - you'll find the same problem for SetGadgetState and so on. Until next beta comes out

Sorry for that!
Re: Form Designer for Mac/Windows/Linux -5.00b2
Thx Polo for you're great work, but i have found some glitches
On Linux:
If you resize the designer, the splitter for the properties/objects is to small, no minwidht defined!
In Preferences the comboboxes to small, the text is not readable.
Greetings - Thomas

On Linux:
If you resize the designer, the splitter for the properties/objects is to small, no minwidht defined!
In Preferences the comboboxes to small, the text is not readable.
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: Form Designer for Mac/Windows/Linux -5.00b2
Fixed, thanks!
Re: Form Designer for Mac/Windows/Linux -5.00b2
Look what I've just added... automatic resizing 
Each gadgets can now be assigned two new flags: width / height relative to parent.
If these flags are assigned, the generated code will compute the width / height according to the parent (either the window or a container).
You just have to check the flag, you can still input the width/height or resize the gadgets as you wish, the FD computes the differences all by itself!
You'll end up with a generated code like this:
(which was tricky to parse back
)
I also added a ResizeGadgets procedure that you can use if you want, it looks like this:
Just add a call to ResizeGadgetsWindow_0() in your window event procedure and all the gadgets are resized automatically!
I used to spend hours typing all ResizeGadget so that they correctly resize everything, it's just amazing not having to do it anymore.
Huge work implementing this though...!
You can test the generated code here (I just added an event loop for testing):

Each gadgets can now be assigned two new flags: width / height relative to parent.
If these flags are assigned, the generated code will compute the width / height according to the parent (either the window or a container).
You just have to check the flag, you can still input the width/height or resize the gadgets as you wish, the FD computes the differences all by itself!
You'll end up with a generated code like this:
Code: Select all
Procedure InitWindow_0()
Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu)
Panel_0 = PanelGadget(#PB_Any, 10, 10, 300, WindowHeight(Window_0) - 20)
AddGadgetItem(Panel_0, -1, "Tab 1")
ScrollArea_0 = ScrollAreaGadget(#PB_Any, 0, 0, GetGadgetAttribute(Panel_0,#PB_Panel_ItemWidth) - 10, GetGadgetAttribute(Panel_0,#PB_Panel_ItemHeight) - 10, 380, 560,1)
CloseGadgetList()
CloseGadgetList()
EndProcedure

I also added a ResizeGadgets procedure that you can use if you want, it looks like this:
Code: Select all
Procedure ResizeGadgetsWindow_0()
ResizeGadget(Panel_0, 10, 10, 300, WindowHeight(Window_0) - 20)
ResizeGadget(ScrollArea_0, 0, 0, GetGadgetAttribute(Panel_0,#PB_Panel_ItemWidth) - 10, GetGadgetAttribute(Panel_0,#PB_Panel_ItemHeight) - 10)
EndProcedure
I used to spend hours typing all ResizeGadget so that they correctly resize everything, it's just amazing not having to do it anymore.
Huge work implementing this though...!
You can test the generated code here (I just added an event loop for testing):
Code: Select all
; Form Designer for Purebasic - 5.0
; Warning: this file uses a strict syntax, if you edit it, make sure to respect the Form Designer limitation or it won't be opened again.
Global Window_0
Global Panel_0, ScrollArea_0
Declare ResizeGadgetsWindow_0()
Procedure InitWindow_0()
Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
Panel_0 = PanelGadget(#PB_Any, 10, 10, 300, WindowHeight(Window_0) - 20)
AddGadgetItem(Panel_0, -1, "Tab 1")
ScrollArea_0 = ScrollAreaGadget(#PB_Any, 0, 0, GetGadgetAttribute(Panel_0,#PB_Panel_ItemWidth) - 10, GetGadgetAttribute(Panel_0,#PB_Panel_ItemHeight) - 10, 380, 560,1)
CloseGadgetList()
CloseGadgetList()
EndProcedure
Procedure ResizeGadgetsWindow_0()
ResizeGadget(Panel_0, 10, 10, 300, WindowHeight(Window_0) - 20)
ResizeGadget(ScrollArea_0, 0, 0, GetGadgetAttribute(Panel_0,#PB_Panel_ItemWidth) - 10, GetGadgetAttribute(Panel_0,#PB_Panel_ItemHeight) - 10)
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
EndProcedure
; --- end of generated code ---
InitWindow_0()
Repeat
event = WaitWindowEvent()
If event = #PB_Event_SizeWindow
ResizeGadgetsWindow_0()
EndIf
Until event = #PB_Event_CloseWindow