Page 90 of 103

Re: Multiple menu's via menu builder?

Posted: Thu Jan 27, 2011 6:01 am
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.

Re: Multiple menu's via menu builder?

Posted: Thu Jan 27, 2011 6:04 am
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...

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Thu Jan 27, 2011 9:16 am
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

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Thu Jan 27, 2011 5:12 pm
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.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Fri Jan 28, 2011 8:57 am
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.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Mon Jan 31, 2011 11:25 am
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.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Mon Jan 31, 2011 12:36 pm
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.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Mon Jan 31, 2011 1:53 pm
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:

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Tue Feb 01, 2011 7:33 am
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

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Tue Feb 01, 2011 10:43 am
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.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Tue Feb 01, 2011 10:59 am
by GeBonet
Ok, merci, tanks,
it's very clear ... Maybe it's just what was missing for me to understand. :oops:

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Tue Feb 01, 2011 3:33 pm
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.

Generated code & balloon tip

Posted: Thu Feb 03, 2011 12:55 am
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.

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Thu Feb 03, 2011 9:21 am
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).

Re: PureFORM 1.99 (yet another FORM designer)

Posted: Thu Feb 03, 2011 5:59 pm
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.