PureFORM 1.99 (yet another FORM designer)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

rrpl
Enthusiast
Enthusiast
Posts: 121
Joined: Fri Apr 18, 2008 7:22 am
Location: Australia

Re: Multiple menu's via menu builder?

Post by rrpl »

Sorry I can't reproduce it here.

I have noticed focus on the menu buider can cause a problem.
Have you clicked on File first, then typed in a new menu listing, given a new Enumeration or click *, then insert or add?

Maybe gnozal will have some other ideas.
"What you are is what you have been. What you’ll be is what you do now.” -Buddha
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Multiple menu's via menu builder?

Post by jassing »

Thanks -- Yes, tried all sorts of things.... Just can't ever get a 2nd item in...
thanks; luckily; I can do it manually...
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

jassing wrote:I have a formset where the main window has a menu. No problem.
On a child form, I wanted to add a menu; I got as far as this: (note, I can't add another title, or menu item)...
How to create a menu using the menu builder :
- you already created a menu title ('File')
- select 'File' (click on it, you'll see a selection bar)
- press button 'LVL1' (first menu level)
- add your text : 'Exit' in your example
- set the menu item enumeration (you may use the '*' button to generate it)
- press 'Add'
You just added a new 'Exit' menu item in the 'File' menu
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

If you noticed, lv1 is disabled. I have a menu for the main window -- so the act of creating it, I know.. it's the availability to specify it that is lacking.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

jassing wrote:If you noticed, lv1 is disabled. I have a menu for the main window -- so the act of creating it, I know.. it's the availability to specify it that is lacking.
Did you read my previous post ?
It is disabled because you didn't select anything.
The buttons are context sensitive, depending on what menu title / menu item (and level) you have selected.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Re: PureFORM 1.99 (yet another FORM designer)

Post by GeBonet »

Hello,
Excuse me, Gnozal, if there is one thing I do is not simple is the construction menu.
Have you seen the way PureVision do that ? This is very simple and visual!
And that's the main reason I use almost no Pureform. It's silly but annoying.
But hey, maybe a way of seeing.
Thank you.

Bonjour,
Excuse moi, Gnozal, si il y a une chose que je ne trouve pas simple c'est la construction de menu avec PureForm ! :(
As-tu vus la manière que PureVision fait ça? Ça c'est ultra simple et visuel ! :lol:
Et c'est la principale raison pour laquelle je n'utilise presque pas PureFORM. C'est bête mais ennuyant. :wink:
Mais bon, c'est peut-être une manière de voir. :wink:
Merci.
Sorry for my english :wink: ! (Windows Xp, Vista and Windows 7, Windows 10)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

GeBonet wrote:Have you seen the way PureVision do that ? This is very simple and visual!
And that's the main reason I use almost no Pureform. It's silly but annoying.
I never really tested PureVision once I found out that it requires a right-click to select / move an object. I found that annoying ;-)
GeBonet wrote:But hey, maybe a way of seeing.
Once you are accustomed to it, it's quite easy to build a menu.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Re: PureFORM 1.99 (yet another FORM designer)

Post by GeBonet »

You're right about PureVision, but if I talk about him is the only and only for that MenuMaker ! :D
So much so that I joined Chris for generating a source window to which I attach a standard menu to save just the coding.
http://www.purebasic.fr/french/viewtopi ... 3&start=15. :wink:
Sorry for my english :wink: ! (Windows Xp, Vista and Windows 7, Windows 10)
rrpl
Enthusiast
Enthusiast
Posts: 121
Joined: Fri Apr 18, 2008 7:22 am
Location: Australia

Re: PureFORM 1.99 (yet another FORM designer)

Post by rrpl »

I have no problem with the way PureForm menu builder works. It would probably be nice for newbs if it automatically gave focus to the first menu item created, then there would be no confusion as to why it doesn't create another one without first selecting the first menu item. I hope my inadequate explanation made sense. :D
"What you are is what you have been. What you’ll be is what you do now.” -Buddha
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

rrpl wrote:I have no problem with the way PureForm menu builder works. It would probably be nice for newbs if it automatically gave focus to the first menu item created, then there would be no confusion as to why it doesn't create another one without first selecting the first menu item. I hope my inadequate explanation made sense. :D
I have updated the help file with a little example.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
GeBonet
Enthusiast
Enthusiast
Posts: 135
Joined: Fri Apr 04, 2008 6:20 pm
Location: Belgium

Re: PureFORM 1.99 (yet another FORM designer)

Post by GeBonet »

Ok, merci, tanks,
it's very clear ... Maybe it's just what was missing for me to understand. :oops:
Sorry for my english :wink: ! (Windows Xp, Vista and Windows 7, Windows 10)
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

A reboot cured my menu issue - Dunno why, but I could not create a 2nd menu in that one project...

After a marathon of coding this past week -- I came up with a couple of wish lists:

Sometimes, and I can't figure out why, a child window suddenly changes to have the size of the parent window. I have to go in set it sizable, leave the window, come back and resize the window back & remove the size gadget.
Would be nice to be able to set your own set of "standard" images for toolbar builder (vs. just the built in images).
Would be nice to be able to set menu/toolbar items as disabled by default.
If you import a window from code -- the status bar is not imported.
When opening up a code window, it seems to always highlight from the bottom of the code to wherever the mouse button clicks to -- so if you click & type -- it erases all the code -- and w/o an "undo"...

I tried purevision -- the "unique" way he has of selecting objects for moving/resize was too annoying, so I cringe anytime I hear "make it like purevision" I couldn't get past that one 'feature'.

Keep up the great work! Let me know if it would help; I'd donate some funds to the cause.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Generated code & balloon tip

Post by jassing »

I have a combo box with a balloon tip: (here's the generated code)

Code: Select all

ComboBox_67_Tooltip = GadgetBalloonToolTip(#Window_0, #ComboBox_67, "Filters list of files by types. TIP: Enter multiple masks seperated by a comma ie: *.doc,*.txt")
ComboBox_67_E_Tooltip = GadgetBalloonToolTip(#Window_0, FindWindowEx_(GadgetID(#ComboBox_67), 0, "Edit", 0), "Filters list of files by types. TIP: Enter multiple masks seperated by a comma ie: *.doc,*.txt")

There is also a listicon that has a balloon tip:

Code: Select all

ListIcon_36_Tooltip = GadgetBalloonToolTip(#Window_0, #ListIcon_36, "List of files to process. TIP: You can drag files from explorer here.")
What I'm seeing is no tooltip for the combo, and "two" balloon tips on the listicon - one appears (the right one) and then a moment later, the combobox's balloon tip appears over it.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PureFORM 1.99 (yet another FORM designer)

Post by gnozal »

You didn't post your project nor executable code.
However, I made a form with an editable combobox and a listicon.
Here is the generated code :

Code: Select all

Enumeration
  #Window_0
EndEnumeration
Enumeration
  #ListIcon_1
  #ComboBox_0
EndEnumeration
Global ListIcon_1_Tooltip
Global ComboBox_0_Tooltip
Global ComboBox_0_E_Tooltip
Procedure GadgetBalloonToolTip(WindowNumber.l, GadgetNumber.l, Text.s)
  Protected Tooltip.l, Balloon.TOOLINFO
  Tooltip = CreateWindowEx_(0, "ToolTips_Class32", "", #WS_POPUP | #TTS_NOPREFIX | #TTS_BALLOON, 0, 0, 0, 0, WindowID(WindowNumber), 0, GetModuleHandle_(0), 0)
  SendMessage_(Tooltip, #TTM_SETTIPTEXTCOLOR, GetSysColor_(#COLOR_INFOTEXT), 0)
  SendMessage_(Tooltip, #TTM_SETTIPBKCOLOR, GetSysColor_(#COLOR_INFOBK), 0)
  SendMessage_(Tooltip, #TTM_SETMAXTIPWIDTH, 0, 180)
  Balloon\cbSize = SizeOf(TOOLINFO)
  Balloon\uFlags = #TTF_IDISHWND | #TTF_SUBCLASS
  If IsGadget(GadgetNumber)
    Balloon\hwnd = GadgetID(GadgetNumber)
    Balloon\uId = GadgetID(GadgetNumber)
  Else
    Balloon\hwnd = GadgetNumber
    Balloon\uId = GadgetNumber
  EndIf
  Balloon\lpszText = @Text
  SendMessage_(Tooltip, #TTM_ADDTOOL, 0, @Balloon)
  ProcedureReturn Tooltip
EndProcedure
Procedure ChangeGadgetBalloonToolTip(Tooltip.l, GadgetNumber.l, Text.s)
  Protected Balloon.TOOLINFO
  Balloon\cbSize = SizeOf(TOOLINFO)
  Balloon\uFlags = #TTF_IDISHWND | #TTF_SUBCLASS
  If IsGadget(GadgetNumber)
    Balloon\hwnd = GadgetID(GadgetNumber)
    Balloon\uId = GadgetID(GadgetNumber)
  Else
    Balloon\hwnd = GadgetNumber
    Balloon\uId = GadgetNumber
  EndIf
  Balloon\lpszText = @Text
  SendMessage_(Tooltip, #TTM_ADDTOOL, 0, @Balloon)
EndProcedure
Procedure FreeBalloonTooltip(Tooltip.l)
  DestroyWindow_(Tooltip.l)
EndProcedure 
Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 450, 200, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    ListIconGadget(#ListIcon_1, 30, 60, 290, 225, "Gadget_1", 100, #PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)
    SendMessage_(GadgetID(#ListIcon_1), #LVM_SETCOLUMNWIDTH, 0, #LVSCW_AUTOSIZE_USEHEADER)
    ListIcon_1_Tooltip = GadgetBalloonToolTip(#Window_0, #ListIcon_1, "ListIcon Tooltip")
    ComboBoxGadget(#ComboBox_0, 30, 25, 195, 20, #PB_ComboBox_Editable)
    ComboBox_0_Tooltip = GadgetBalloonToolTip(#Window_0, #ComboBox_0, "Combo Tooltip")
    ComboBox_0_E_Tooltip = GadgetBalloonToolTip(#Window_0, FindWindowEx_(GadgetID(#ComboBox_0), 0, "Edit", 0), "Combo Tooltip")
  EndIf
EndProcedure

OpenWindow_Window_0()

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
    Case #PB_Event_CloseWindow
      Select EventWindow()
        Case #Window_0
          CloseWindow(#Window_0)
          Break
      EndSelect
  EndSelect
ForEver
When I run the code (PB4.51 x86), the balloon tooltips show as expected (XP x86 sp3).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: PureFORM 1.99 (yet another FORM designer)

Post by jassing »

gnozal wrote:You didn't post your project nor executable code.
However, I made a form with an editable combobox and a listicon.
I thought I posted the relevant code -- unfortunately; I cannot post the actual code. Nor would you want me to --it's several thousand lines long...

Noted tho -- Post all code or don't ask a question... Check!

If you want, I can email you the pureform project file and you can see the code that it generates. It ain't pretty and it won't run "as is" but you can see the generated code.
Last edited by jassing on Thu Feb 03, 2011 6:03 pm, edited 1 time in total.
Post Reply