Form Designer 5.10

You need some new stunning features ? Tell us here.
luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: Form Designer 5.00 beta 2.2

Post by luciano »

Hi,
I cannot remove the colors from the gadgets in the following code in FD:

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 Container_0, Editor_0, ListIcon_0, ScrollArea_0, String_0, Text_0, Tree_0

Declare ResizeGadgetsWindow_0()

Procedure InitWindow_0()
  Protected WindowWidth, WindowHeight
  Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
  WindowWidth = WindowWidth(Window_0)
  WindowHeight = WindowHeight(Window_0)
  Container_0 = ContainerGadget(#PB_Any, 0, 0, WindowWidth - 0, 80)
  SetGadgetColor(Container_0, #PB_Gadget_BackColor,RGB(64,128,128))
  CloseGadgetList()
  Editor_0 = EditorGadget(#PB_Any, 20, 100, 90, 70)
  SetGadgetColor(Editor_0, #PB_Gadget_FrontColor,RGB(128,0,128))
  SetGadgetColor(Editor_0, #PB_Gadget_BackColor,RGB(128,128,128))
  ListIcon_0 = ListIconGadget(#PB_Any, 120, 100, 270, 150, "", 100)
  SetGadgetColor(ListIcon_0, #PB_Gadget_FrontColor,RGB(0,0,64))
  SetGadgetColor(ListIcon_0, #PB_Gadget_BackColor,RGB(128,128,64))
  ScrollArea_0 = ScrollAreaGadget(#PB_Any, 420, 110, 150, 190, 350, 390,1)
  SetGadgetColor(ScrollArea_0, #PB_Gadget_FrontColor,RGB(0,0,64))
  SetGadgetColor(ScrollArea_0, #PB_Gadget_BackColor,RGB(64,0,64))
  CloseGadgetList()
  String_0 = StringGadget(#PB_Any, 30, 290, 210, 60, "", #PB_String_BorderLess)
  SetGadgetColor(String_0, #PB_Gadget_FrontColor,RGB(0,128,192))
  SetGadgetColor(String_0, #PB_Gadget_BackColor,RGB(255,128,255))
  Text_0 = TextGadget(#PB_Any, 260, 330, 110, 50, "")
  SetGadgetColor(Text_0, #PB_Gadget_FrontColor,RGB(128,0,64))
  SetGadgetColor(Text_0, #PB_Gadget_BackColor,RGB(128,128,128))
  Tree_0 = TreeGadget(#PB_Any, 410, 320, 150, 70)
  SetGadgetColor(Tree_0, #PB_Gadget_FrontColor,RGB(192,192,192))
  SetGadgetColor(Tree_0, #PB_Gadget_BackColor,RGB(64,128,128))
EndProcedure

Procedure ResizeGadgetsWindow_0()
  Protected WindowWidth, WindowHeight
  WindowWidth = WindowWidth(Window_0)
  WindowHeight = WindowHeight(Window_0)
  ResizeGadget(Container_0, 0, 0, WindowWidth - 0, 80)
  ResizeGadget(Editor_0, 20, 100, 90, 70)
  ResizeGadget(ListIcon_0, 120, 100, 270, 150)
  ResizeGadget(ScrollArea_0, 420, 110, 150, 190)
  ResizeGadget(String_0, 30, 290, 210, 60)
  ResizeGadget(Text_0, 260, 330, 110, 50)
  ResizeGadget(Tree_0, 410, 320, 150, 70)
EndProcedure

Procedure Window_0_Events(event)
  Select event
    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
  EndSelect
EndProcedure
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer 5.00 beta 2.2

Post by Polo »

luciano wrote:Hi,
I cannot remove the colors from the gadgets in the following code in FD:
Oops! Fixed :)
Warmonger
Enthusiast
Enthusiast
Posts: 156
Joined: Wed Apr 20, 2011 4:24 pm

Re: Form Designer 5.00 beta 2.2

Post by Warmonger »

Polo wrote:
Warmonger wrote:Also lastly, im not sure if its OS specific but on Windows XP the 3DFrame captions are black (im guessing the background) so you cant even view the text. Example below.
Fixed.

Thanks for all your testing and suggestions. Scrollbars being not live is due to PB Event Handling, might add a workaround.
I've added all you said to my list and will try to see what can be done :)
The scroll bars are disabled and hidden by default until the inner scroll area exceeds beyond the scrollarea gadget. So I wouldn't imagine it to be no more then a 30 second fix. :)
Its Not A Bug, Its An Undocumented Feature!
Relax Its All Just Ones And Zeros
There Is No Place Like 127.0.0.1 Except ::1
I do things TO my computer, not WITH my computer... I am a nerd.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer 5.00 beta 2.2

Post by Polo »

Warmonger wrote:
Polo wrote:
Warmonger wrote:Also lastly, im not sure if its OS specific but on Windows XP the 3DFrame captions are black (im guessing the background) so you cant even view the text. Example below.
Fixed.

Thanks for all your testing and suggestions. Scrollbars being not live is due to PB Event Handling, might add a workaround.
I've added all you said to my list and will try to see what can be done :)
The scroll bars are disabled and hidden by default until the inner scroll area exceeds beyond the scrollarea gadget. So I wouldn't imagine it to be no more then a 30 second fix. :)
I'm not using a ScrollArea ;)

Added level support to TreeGadget items.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer 5.00 beta 2.2

Post by Polo »

Here's a new beta (5.00b2.3) as I'll probably won't be able to make a new release next week ;)
http://www.gdpcomputing.co.uk/formdesigner.html

(sorry, I forgot one more time to compile in Unicode on Windows, next time will be the one!)
Warmonger
Enthusiast
Enthusiast
Posts: 156
Joined: Wed Apr 20, 2011 4:24 pm

Re: Form Designer 5.00 beta 2.2

Post by Warmonger »

Polo wrote:Here's a new beta (5.00b2.3) as I'll probably won't be able to make a new release next week ;)
http://www.gdpcomputing.co.uk/formdesigner.html

(sorry, I forgot one more time to compile in Unicode on Windows, next time will be the one!)
Bugs,
- When re-sizing the design window larger then the design field, the scroll bars appear then disappear.
- When res-sizing the design window smaller then the design field, the scroll bars disappear but leave a grey mark where they existed (design field needing an update or something).
- When scrolling in the Properties box, the contents do not scroll along with the scroll bar.

Other then that the toolbox could use some more fancy touches to make things a bit more user friendly (visually). After that its only cosmetics like coming up with a re-size gadgets function etc.
Its Not A Bug, Its An Undocumented Feature!
Relax Its All Just Ones And Zeros
There Is No Place Like 127.0.0.1 Except ::1
I do things TO my computer, not WITH my computer... I am a nerd.
luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: Form Designer 5.00 beta 2.3

Post by luciano »

Gaetan,
wonderful work
systembar, color problems, etc. all solved.

Listicon Edit with right click is very useful, one problem here; "AddGadgetColumn" puts a negative number and the compiler (windows at least) requires a positive one,
quite strange as "AddGadgetItem" requires a negative one.

replacing the two -1 with 1 and 2 solved it

Code: Select all

  AddGadgetColumn(ListIcon_0, 1, "Column 2", 100)
  AddGadgetColumn(ListIcon_0, 2, "Column 3", 100)
Original code

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 ListIcon_0

Declare ResizeGadgetsWindow_0()

Procedure InitWindow_0()
  Protected WindowWidth, WindowHeight
  Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu)
  WindowWidth = WindowWidth(Window_0)
  WindowHeight = WindowHeight(Window_0)
  ListIcon_0 = ListIconGadget(#PB_Any, 70, 40, 350, 160, "Column 1", 100)

  AddGadgetColumn(ListIcon_0, -1, "Column 2", 100)
  AddGadgetColumn(ListIcon_0, -1, "Column 3", 100)

  AddGadgetItem(ListIcon_0, -1, "T1" + Chr(10) + "T2" + Chr(10) + "T3")
  AddGadgetItem(ListIcon_0, -1, "U1" + Chr(10) + "U2" + Chr(10) + "U3")
EndProcedure

Procedure ResizeGadgetsWindow_0()
  Protected WindowWidth, WindowHeight
  WindowWidth = WindowWidth(Window_0)
  WindowHeight = WindowHeight(Window_0)
  ResizeGadget(ListIcon_0, 70, 40, 350, 160)
EndProcedure

Procedure Window_0_Events(event)
  Select event
    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
  EndSelect
EndProcedure
Last edited by luciano on Mon Sep 10, 2012 8:35 am, edited 2 times in total.
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: Form Designer 5.00 beta 2.3

Post by falsam »

it is possible to draw a gadget without selecting a model.

= #PB_Any, 340, 120, 150, 40)

Code: Select all

Procedure InitWindow_0()
  Protected WindowWidth, WindowHeight
  Window_0 = OpenWindow(#PB_Any, 0, 0, 600, 400, "", #PB_Window_SystemMenu)
  WindowWidth = WindowWidth(Window_0)
  WindowHeight = WindowHeight(Window_0)
   = #PB_Any, 340, 120, 150, 40)
EndProcedure

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer 5.00 beta 2.3

Post by Polo »

Falsam - Can you tell the steps to do that?
Thanks for the testing I'll fix those bugs during the week when I'm back home :)
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: Form Designer 5.00 beta 2.3

Post by falsam »

Polo wrote:Falsam - Can you tell the steps to do that?
Yes i can :)

1-Run Form Designer
2-Forgets to select a model gadget.
3-Draw the gadget
4-Say "Ooops !!! , I forgot to select a model"
5-Look at the generated code.

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Form Designer 5.00 beta 2.3

Post by Mindphazer »

To complete Falsam's answer :
What he describes happens in Windows only (I don't have a linux VM to check)
I don't have this problem on OS X....
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Form Designer 5.00 beta 2.3

Post by ts-soft »

The generated Enumeration is false!

Code: Select all

Enumeration #PB_Compiler_EnumerationValue ; false
  #Window_0
EndEnumeration

Enumeration #PB_Compiler_EnumerationValue
  #Button_0
EndEnumeration

Debug #Button_0 ; should 0!
Please, remove the #PB_Compiler_EnumerationValue, the enumeration should start for all objects with 0!

I would add a comment like this:

Code: Select all

Enumeration ; Windows
  #Window_0
EndEnumeration

Enumeration ; Gadgets
  #Button_0
EndEnumeration
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.
Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer 5.00 beta 2.3

Post by Polo »

Imagine you're including 2 or more .pbf files in your project ;)
The #PB constant had been added for a reason ;)
User avatar
captain_skank
Enthusiast
Enthusiast
Posts: 639
Joined: Fri Oct 06, 2006 3:57 pm
Location: England

Re: Form Designer 5.00 beta 2.3

Post by captain_skank »

1st up - this is an awesome piece of work polo.

Is there any intention to include a compile/preview mode ?

Going further would it be possible to allow the user to type in code in the code window - maybe prefix typed in code with a symbol to show it's user added ??

For me, this would make this the 'killer' pb app.

As an aside - is each of the available 'gadgets' a canvas gadget in disguise ?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer 5.00 beta 2.3

Post by Polo »

The whole thing is one canvas, then everything's drawn onto it.
Live code editing is absolutely possible - though it will be added once it is included in the IDE - not now, thus!
For the same reason preview mode won't be added yet. ;)
Post Reply