Page 101 of 103

Re: getting "toggle child window" to stick?

Posted: Wed Dec 05, 2012 10:18 am
by gnozal
jassing wrote:
gnozal wrote:The [Main Window], [Child Window] and 'non child window' status is saved with the form (*.pbf file) [if a main window is defined].
bummer, because everytime I open it; I have to re-toggle it off.

Has happened in at least 3 project files...
Strange, seems to work here...
jassing wrote:Is there a way to copy objects & code to a new window/project? Or would I need to recreate the project?
You could try the templates [right click on gadget group to save, right click on window or container to load].

Anyway, if you have a look at the project file (*.pbf), you may notice that :
- the main window has it's gadget number followed by '$' : Window¶1$¶#Window_0¶...
- a toogled window has it's gadget number followed by '*' : Window¶2*¶#Window_Toggle¶...
- a child window has it's gadget number followed by nothing : Window¶3¶#Window_3¶...

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Wed Dec 05, 2012 11:08 am
by gnozal
Maitre_Kanter wrote:Corrected, missing Windows Definitions in previous post:

Code: Select all

#KF_UP       =       $8000
#KF_RECENTLY_PRESSED = $0001
Thanks, but I can't get the code to work with PB3.94.
Will try when I have more time.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Sun Dec 09, 2012 8:39 am
by Maitre_Kanter
gnozal wrote:
Maitre_Kanter wrote:Corrected, missing Windows Definitions in previous post:

Code: Select all

#KF_UP       =       $8000
#KF_RECENTLY_PRESSED = $0001
Thanks, but I can't get the code to work with PB3.94.
Will try when I have more time.
Now, it's compliant with Purebasic 3.94 and Tested on Windows 7 64bits [PASS]

Code: Select all

;- enumeration (Windows)
#KF_UP       =          $8000
#KF_RECENTLY_PRESSED =  $0001

;- enumeration (Owner)
#KEY_UP = 0
#KEY_DOWN  = 1
#KEY_STILL_DOWN  = 2

;- Globals (Purebasic 3.94 : No Unsigned U type)
Global    F5_KeyCurrentState.l
Global    F5_KeyTrigger.l

OpenWindow( 0 , 20 , 20 , 20 , 20 , #PB_Window_ScreenCentered ,"Test KeyUp" )

;{- Event loop
Repeat
  ;:PureFORM:Loop:Start:
  Delay(1)
  
  WaitWindowEvent()
  
  F5_KeyCurrentState = GetAsyncKeyState_(#VK_F5)
   
  (Purebasic 3.94 : No Unsigned U type so F5_KeyCurrentState is negative when it's > $7FFF)
  If ( F5_KeyCurrentState < 0 )
  
    Select ( F5_KeyCurrentState & (#KF_UP | #KF_RECENTLY_PRESSED ))
      Case #KF_UP | #KF_RECENTLY_PRESSED
        F5_KeyTrigger = #KEY_DOWN
      Case #KF_UP
        F5_KeyTrigger = #KEY_STILL_DOWN    ;repeat     
    EndSelect
  Else
    If ( F5_KeyTrigger >= #KEY_DOWN )
      F5_KeyTrigger = #KEY_UP
      Debug "#KEY_UP" 
    EndIf
  EndIf      
      
  ;:PureFORM:Loop:End:
ForEver      

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Mon Dec 10, 2012 12:26 pm
by gnozal
Update

Changes :
 - changed some of PureFORM's internal code according to Maitre_Kanter's suggestion (regarding keyboard shortcuts).

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Fri Dec 28, 2012 1:06 pm
by nicolaus
HI gnozal,

i have found a bug in PureFORM.
If you put 2 or more Container Gadgets to a Window and set all to Hide expect the 2. or 3. or so and create the code, the code to hide the ContainerGadget will not be safed.
I hope you know what i mean. If not i can post also a sample.


[EDIT]
It looks that the setting "disable / enable" dose also not be saved in the code for Buttons.
[/EDIT]

Cheers,
Nico

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Mon Dec 31, 2012 9:23 am
by gnozal
nicolaus wrote:HI gnozal,
i have found a bug in PureFORM.
If you put 2 or more Container Gadgets to a Window and set all to Hide expect the 2. or 3. or so and create the code, the code to hide the ContainerGadget will not be safed.
I hope you know what i mean. If not i can post also a sample.
It looks that the setting "disable / enable" dose also not be saved in the code for Buttons.
Hi nicolaus,
this is not a bug.
As stated in the help file, Disable / Hide is designed for building the form, not for code generation.
PureFORM.chm wrote:Disable / Hide :
You can hide and/or disable the gadget in the form. This can be handy if you have several layers of gadgets.
The hidden or disabled state is not translated during code generation.

Tab order and PanelGadget order within PureForm Designer

Posted: Wed Jan 02, 2013 11:27 am
by menschmarkus
Hi Gnozal,

I use PureForm for a time and I am very satisfied with it.
Possibly someone asked this earlier but I did not read previous 100 pages of this topic.

I had a window where I used PanelGadget with 12 Panels. For organization I would like to move one panel to an other position including its content. I would copy (move) the content gadgets but I did not find a way to include a new panel into a specific position. How can I solve this problem?
I know, I can copy the source and replace complete gadgetlist of one panel to the correct position but I need to do this every time I make changes to the window. I think this is a cumbersome work.

As second thing I would like to organize specific TAB order of StringGadgets and ButtonGadgets and would like to disable tab order of other gadgets. I could not find something for this as well.

It would be great If I could organize these thing inside PureForm.

Thanks for you assistance

menschmarkus

Re: Tab order and PanelGadget order within PureForm Designer

Posted: Wed Jan 02, 2013 12:03 pm
by gnozal
menschmarkus wrote:I had a window where I used PanelGadget with 12 Panels. For organization I would like to move one panel to an other position including its content. I would copy (move) the content gadgets but I did not find a way to include a new panel into a specific position. How can I solve this problem?
You may use the context menu (right-click on the PanelGadget) to swap tab positions (including their content).
menschmarkus wrote:As second thing I would like to organize specific TAB order of StringGadgets and ButtonGadgets and would like to disable tab order of other gadgets. I could not find something for this as well.
Afaik, the only way to remove gadgets from the tab order is to use API in order to remove the #WS_TABSTOP style, like SetWindowLong_(GadgetID, #GWL_STYLE, GetWindowLong_(GadgetID, #GWL_STYLE) & ~#WS_TABSTOP)).

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Wed Jan 02, 2013 3:58 pm
by menschmarkus
Gnozal,

thanks for your quick reply. Found swap in context menu. Perfect. :D
Regarding TAB stop, thanks for your hint :)

menschmarkus

General impression of PureForm: :mrgreen:

PureForm wishlist ("use select")

Posted: Wed Jan 09, 2013 1:31 am
by jassing
I would prefer (readability) to use the option of "Use Select statements" -- however, it poses a problem for other code
When using IF/elseif/endif -
Event = WaitWindowEvent(10)

So you can query a variable in your sub routines.
When you use a select, the WaitWindowEvent() is placed directly in the Select statement, so you can never get that event ID outside of the select / endselect context.

Would be nice if it would assign to a variable before using Select.

PureForm using depreciated....

Posted: Wed Jan 09, 2013 2:34 am
by jassing
Just doing a mock up for proof of concept; used pureform to generate the code.
Compiler dished out a warning "Depreciated function 'CreateGadgetList()' used"
Is there a way to turn that off?

Re: PureForm using depreciated....

Posted: Wed Jan 09, 2013 4:11 am
by Shield
You have the option to turn off warnings in the compiler settings...however, it doesn't seem to work. :?
But you can just remove the call as it's no longer necessary.

Re: PureForm using depreciated....

Posted: Wed Jan 09, 2013 4:14 am
by jassing
Shield wrote:You have the option to turn off warnings in the compiler settings...however, it doesn't seem to work. :?
But you can just remove the call as it's no longer necessary.
My point was that PureForm shouldn't be putting it in to begin with, since it's no longer needed...

Re: PureForm using depreciated....

Posted: Wed Jan 09, 2013 4:25 am
by Shield
Oh I didn't realize there was a sub-forum dedicated to PureForm. :?
In that case...should be fixed ^_^.

Re: PureForm using depreciated....

Posted: Wed Jan 09, 2013 4:29 am
by MachineCode
It is needed for PureBasic 4.20 and lower, which some people still use (especially 3.94). Having said that, they really need to get with the times and upgrade. :)