Page 9 of 45

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

Posted: Thu Aug 23, 2012 4:37 pm
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


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

Posted: Thu Aug 23, 2012 4:59 pm
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).

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

Posted: Thu Aug 23, 2012 4:59 pm
by Polo
Thanks for those suggestions and bug reports I'll look into it tomorrow when I get home!

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

Posted: Thu Aug 23, 2012 5:24 pm
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.

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

Posted: Thu Aug 23, 2012 5:31 pm
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

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

Posted: Thu Aug 23, 2012 8:30 pm
by Polo
Thanks for the good testing Jesper, keep the suggestions coming!

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

Posted: Fri Aug 24, 2012 8:50 pm
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! :)

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

Posted: Fri Aug 24, 2012 10:10 pm
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.

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

Posted: Fri Aug 24, 2012 10:21 pm
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 ;)

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

Posted: Sat Aug 25, 2012 1:36 am
by ricardo
Congrats!! Excelent job!!

10 years ago i made the first PB Visual IDE (in VB)... how fast the time pass!!

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

Posted: Sat Aug 25, 2012 3:43 pm
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.

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

Posted: Sat Aug 25, 2012 3:52 pm
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 ;)

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

Posted: Sat Aug 25, 2012 4:11 pm
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...)

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

Posted: Sat Aug 25, 2012 4:37 pm
by wilbert
Are you using separate language files so others can also make translations or do you compile them into the application ?

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

Posted: Sat Aug 25, 2012 4:40 pm
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 ;)