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 for Mac/Windows/Linux - beta 6

Post by luciano »

It seems to me that if I add a toolbar I cannot resize the form window (within Form Designer) using the bottom-right handle any more.
If the toolbar is removed then the small handle works again.

Code: Select all

Global Window_2

Procedure InitWindow_2()
  Window_2 = OpenWindow(#PB_Any, 0, 0, 660, 280, "", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar)
  CreateToolbar(0, WindowID(Window_2))
  ToolBarSeparator()
EndProcedure

InitWindow_2()

Procedure Window_2_Events(event)
  Select event
    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
    Case #PB_Event_CloseWindow
      CloseWindow(Window_2)
  EndSelect
EndProcedure

luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by luciano »

Some more beta testing ;-)
Progress bar: min and max values are not retained (nor in the property panel, nor are inserted into code).
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

Thanks for those suggestions and bug reports I'll look into it tomorrow when I get home!
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by jesperbrannmark »

I made a quick keyboard shortcut code.
I tried making a

Code: Select all

If Not shortcutnr:    shortcutnr=GetActiveGadget():    EndIf
but it didnt work, probably because the gadget is made after the caption is set and not the other way around.
There are plenty of improvements that can be made here...

Code: Select all

Procedure.s shortcut(string.s,shortcutnr=0)
  If Not GetActiveWindow() Or Not string.s
    ProcedureReturn
  EndIf 
  If Mid(string,FindString(string,"&")+1,1)="0"
    If Not shortcutnr:    shortcutnr=GetActiveGadget():    EndIf
    AddKeyboardShortcut(GetActiveWindow(),#PB_Shortcut_Alt | (48),shortcutnr)
  ElseIf Val(Mid(string,FindString(string,"&")+1,1))
    If Not shortcutnr:    shortcutnr=GetActiveGadget():    EndIf
    AddKeyboardShortcut(GetActiveWindow(),#PB_Shortcut_Alt | (48+Val(Mid(string,FindString(string,"&")+1,1))),shortcutnr)
  ElseIf Mid(UCase(string),FindString(string,"&")+1,1)>"A" And Mid(UCase(string),FindString(string,"&")+1,1)<"Z"
    If Not shortcutnr:    shortcutnr=GetActiveGadget():    EndIf
    AddKeyboardShortcut(GetActiveWindow(),#PB_Shortcut_Alt | (Asc(UCase(Mid(string,FindString(string,"&")+1,1)))),shortcutnr)
  EndIf    
  ProcedureReturn string.s
EndProcedure
OpenWindow(#PB_Any,0,0,320,200,"Test")
OptionGadget(1,0,0,100,24,shortcut("This &is a test",1))
OptionGadget(2,0,30,100,24,shortcut("This i&s a test",2))
Repeat
  eventid=WaitWindowEvent()
  If eventid=#PB_Event_Menu
    If IsGadget(EventMenu())
      SetActiveGadget(EventMenu())
      SetGadgetState(EventMenu(),1-GetGadgetState(EventMenu()))
    EndIf
  EndIf
Until eventid=#PB_Event_CloseWindow
What I do is basicly copying the gadget numbers to menu numbers. So in case you use a popupmenu or whatever it should have a different number series.
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by jesperbrannmark »

Here is some more:
* On Optiongadget would be good with "selected" as a option (that does it like setgadgetstate(gadget,1) )
* On checkbox checked (that includes setgadgetstate(gadget,#pb_checkbox_checked))
etc
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

Thanks for the good testing Jesper, keep the suggestions coming!
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

Following bugs:
luciano wrote:Progress bar: min and max values are not retained (nor in the property panel, nor are inserted into code).
luciano wrote:It seems to me that if I add a toolbar I cannot resize the form window (within Form Designer) using the bottom-right handle any more.
If the toolbar is removed then the small handle works again.
jesperbrannmark wrote:Dategadget - in properties the mask...
jesperbrannmark wrote:* If you copy a gadget, then deselect and rightclick you cant paste it (no popup menu if no gadget is selected)
michel wrote:Windows Beta 8, button caption is no longer updated on screen
... are fixed for next beta.
jesperbrannmark wrote:CTRL-C / CTRL-V / CTRL-X (copy, paste, cut) are great key shortcuts
They should already be working?

I've written down all other suggestions - they might or might not make it for the first version, though they should be implemented at some point as I think they are quite good! :)
luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by luciano »

jesperbrannmark wrote:
CTRL-C / CTRL-V / CTRL-X (copy, paste, cut) are great key shortcuts

They should already be working?
Sometimes when I select the code and press CTRL-C to copy and paste in PB, I realize that I have nothing in the clipboard.
Then I click in the property grid and then again in the code area and "copy" seems to work again.
It is difficult to explain, but I suppose the corsor is hidden in some field and copy does not work correctly.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

luciano wrote:
jesperbrannmark wrote:
CTRL-C / CTRL-V / CTRL-X (copy, paste, cut) are great key shortcuts

They should already be working?
Sometimes when I select the code and press CTRL-C to copy and paste in PB, I realize that I have nothing in the clipboard.
Then I click in the property grid and then again in the code area and "copy" seems to work again.
It is difficult to explain, but I suppose the corsor is hidden in some field and copy does not work correctly.
Ok, should be fixed for next beta, thanks ;)
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by ricardo »

Congrats!! Excelent job!!

10 years ago i made the first PB Visual IDE (in VB)... how fast the time pass!!
ARGENTINA WORLD CHAMPION
luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by luciano »

Hi Gaetan,
after some more testing, I would suggest you some simple improvements to Form Designer.

- it is easy to draw empty gadgets by mistake (and forget them around) when "Text" or "Image gadget" are selected in "Decoration/containers menu", since they are not visible until you select a picture or you add some text.
it would be useful to show something anyway (e.g. a large "x" in an empty gadget)

-Text gadget show the text in middle part, but in reality text starts from top.

-It would be nice to have a preview button which directly call compiler and the "real thing" can be seen directly, thus avoiding copy and pasting to PB ide.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

luciano wrote:Hi Gaetan,
after some more testing, I would suggest you some simple improvements to Form Designer.

- it is easy to draw empty gadgets by mistake (and forget them around) when "Text" or "Image gadget" are selected in "Decoration/containers menu", since they are not visible until you select a picture or you add some text.
it would be useful to show something anyway (e.g. a large "x" in an empty gadget)

-Text gadget show the text in middle part, but in reality text starts from top.
Added to my todo list ;)
luciano wrote:-It would be nice to have a preview button which directly call compiler and the "real thing" can be seen directly, thus avoiding copy and pasting to PB ide.
True, though to be honest I don't want to spend time right now to understand how the compiler should be called, so unless someone has a nice CompileFile(file) procedure, that'll be added later ;)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

jesperbrannmark wrote:* On Optiongadget would be good with "selected" as a option (that does it like setgadgetstate(gadget,1) )
* On checkbox checked (that includes setgadgetstate(gadget,#pb_checkbox_checked))
Added.

Next beta will have language support (which will be English, French and broken Spanish for a start, hope someone can correct the files and make some new translation!)
I added a few minor things as well (ie ability to put the toolpanel on the right or on the left etc...)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by wilbert »

Are you using separate language files so others can also make translations or do you compile them into the application ?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: Form Designer for Mac/Windows/Linux - beta 6

Post by Polo »

wilbert wrote:Are you using separate language files so others can also make translations or do you compile them into the application ?
I'm using the same system Fred and Timo use - anyone can make translations then ;)
Post Reply