It is currently Wed Aug 21, 2019 4:13 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: FormDesigner Menu Design mode issue
PostPosted: Tue Jan 17, 2017 3:43 am 
Offline
User
User

Joined: Mon Jul 18, 2016 6:43 pm
Posts: 35
I used FormDesigner to create a menu. Something simple like:

MainMenu
SubMenu1
SubMenu1Item1
SubMenu1Item2
SubMenu2
SubMenu2Item1
SubMenu2Item2

When FormDesigner is building the menu, it shows it as expected in the GUI design. The code should look like:

Code:
  CreateMenu(0, WindowID(Window_0))
  MenuTitle("MenuTitle")
  OpenSubMenu("SubMenu1")
  MenuItem(#MenuItem_3, "SubMenu1Item1")
  MenuItem(#MenuItem_4, "SubMenu1Item2")
  CloseSubMenu()
  OpenSubMenu("SubMenu2")
  MenuItem(#MenuItem_6, "SubMenu2Item1")
  MenuItem(#MenuItem_7, "SubMenu2Item2")
  CloseSubMenu()


But If I save the code and look at it, FormDesigner has make SubMenu2 a submenu under submenu1.

MainMenu
SubMenu1
SubMenu1Item1
SubMenu1Item2
SubMenu1SubMenu2
SubMenu2Item1
SubMenu2Item2


Code:
  CreateMenu(0, WindowID(Window_0))
  MenuTitle("MenuTitle")
  OpenSubMenu("SubMenu1")
  MenuItem(#MenuItem_3, "SubMenu1Item1")
  MenuItem(#MenuItem_4, "SubMenu1Item2")
  OpenSubMenu("SubMenu2")
  MenuItem(#MenuItem_6, "SubMenu2Item1")
  MenuItem(#MenuItem_7, "SubMenu2Item2")
  CloseSubMenu()
  CloseSubMenu()


If in Code View I edit the code to put the CloseSubMenu() back in the correct place and switch to design view, the menu looks correct. But if I then switch back to Code View, the code is now incorrect. The next time I switch to Design View, the CloseSubMenu() is again in the wrong place.

I had to hand code the menus in my PB file because of the CloseSubMenu() misplacement.


Top
 Profile  
Reply with quote  
 Post subject: Re: FormDesigner Menu Design mode issue
PostPosted: Tue Jan 17, 2017 3:57 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 2213
Location: Singapore
dougmo52usr wrote:
...in Code View I edit the code to put the CloseSubMenu() back in the correct place and switch to design view, the menu looks correct.

The code page of the Form Designer does not accept edits. It conforms strictly to the properties of the visual objects, and generates the code accordingly. Any changes must be made in the visual window.

_________________
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: FormDesigner Menu Design mode issue
PostPosted: Tue Jan 17, 2017 5:03 am 
Offline
User
User

Joined: Mon Jul 18, 2016 6:43 pm
Posts: 35
Here's a link to what I saw in FormDesigner during the menu design:
https://www.dropbox.com/s/533vkggb5twdd ... 1.png?dl=0

Now I went from Design to Code to Design viwe and the appearance changed without editing the pbf file:
https://www.dropbox.com/s/ldaerxgszdp7h ... 2.png?dl=0

FormDesigner broke the code by relocating the CloseSubMenu() call. It changed merely be changing FormDesigner views, but if I compile and run the app, it is also incorrect.


Top
 Profile  
Reply with quote  
 Post subject: Re: FormDesigner Menu Design mode issue
PostPosted: Tue Jan 17, 2017 9:08 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 2213
Location: Singapore
dougmo52usr wrote:
FormDesigner broke the code by relocating the CloseSubMenu() call...

You're right; there appears to be some inconsistencies in Form Designer's menu builder.

Image

_________________
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye