It is currently Tue Sep 25, 2018 12:19 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Toolbar gadget in Form Designer
PostPosted: Sat Jun 30, 2018 12:52 pm 
Offline
User
User

Joined: Thu May 03, 2018 4:24 pm
Posts: 30
In Form Designer, you can't select a Toolbar gadget and set its properties, so all toolbars are created with #Toolbar of 0. This means that if you have form 1 with a toolbar, and then you open form 2 that also has a toolbar, the toolbar from from 1 will disappear because the toolbar in form 2 overwrites the one in form 1.

It's the same situation with the StatusBar gadget.

There are two workarounds. You can manually change the toolbar number in the form code after using the designer. You'll just have to remember to make this manual change after every time you use the designer. You can also recreate the toolbar in code when form 1 becomes active again.


Top
 Profile  
Reply with quote  
 Post subject: Re: Toolbar gadget in Form Designer
PostPosted: Sat Jun 30, 2018 1:47 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1386
Location: Germany
My Eventdesigner build a right commonfile.pb from pbf-files.

Link: viewtopic.php?f=14&t=65033

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Toolbar gadget in Form Designer
PostPosted: Sat Jun 30, 2018 6:35 pm 
Offline
User
User

Joined: Thu May 03, 2018 4:24 pm
Posts: 30
Thank you! I will take a look.


Top
 Profile  
Reply with quote  
 Post subject: Re: Toolbar gadget in Form Designer
PostPosted: Tue Jul 03, 2018 3:39 am 
Offline
User
User

Joined: Thu May 03, 2018 4:24 pm
Posts: 30
I'm sorry, but while EventDesigner is impressive, it doesn't seem related to the issue I posted.

The issue is that you cannot really create forms with toolbars and status bars in Form Designer because they all wind up with the same ID. You have to manually edit the code, but those edits disappear when you reload the form in Form Designer, of course.


Top
 Profile  
Reply with quote  
 Post subject: Re: Toolbar gadget in Form Designer
PostPosted: Tue Jul 03, 2018 4:07 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 469
Yes, it is indeed a pity, especially since the form designer knows how to deal with all the other gadgets as soon as they are created in the same session or the same project. (He does give a different number)

Also, it would be nice if the form designer could handle the new size icons (24x24 [+ text]) that appeared with v5.60 (it's very long to do it by hand, while the form designer handles the 16x16 toolbar very well)

:wink:

_________________
(English is not my native language, I used an online translator)
Windows 10 x64 - CPU intel i3 - RAM 16Go - NVidia GT 620 - 1920x1080 - Linux Slackware, Debian - xfce - (VirtualBox 5) - raspberry pi


Top
 Profile  
Reply with quote  
 Post subject: Re: Toolbar gadget in Form Designer
PostPosted: Tue Jul 03, 2018 5:36 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1386
Location: Germany
RobertSF wrote:
I'm sorry, but while EventDesigner is impressive, it doesn't seem related to the issue I posted.

The issue is that you cannot really create forms with toolbars and status bars in Form Designer because they all wind up with the same ID. You have to manually edit the code, but those edits disappear when you reload the form in Form Designer, of course.


I know this and the EventDesigner corrects it by creating a new file.

Example:
Create two forms with the window constant FormMain (file FormMain.pbf) and one with the window constant FormDialog (file FormDialog.pbf).
Add these files to EventDesigner in the order FormMain and then FormDiaglog.
The result is a file 'commonfile.pb' with the appropriate constants. All gadgets, menus, etc get the constant of the window as prefix.
You don't need to take the event manager if you don't want to.
If the form changes, just call it up again.

P.S.
Some bugs found because PB v5.62
New Version Online EventDesigner v1.07

_________________
My Projects OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer /
PB v3.30 / v5.60 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Toolbar gadget in Form Designer
PostPosted: Wed Jul 04, 2018 5:11 am 
Offline
User
User

Joined: Thu May 03, 2018 4:24 pm
Posts: 30
Yes, I now see what you mean. I think I can use it in a different project, but for this simple one, I need large icons in the toolbar as well. Here is the workaround I came up with.

1.- Design the form with Form Designer as usual.
2.- Switch the form to code view and copy all the code.
3.- Paste the code exactly where you were going to use FileInclude to include the form file.
4.- Now tweak the form code where you pasted it.

If you ever need to change the form, change it with Form Designer and repeat steps 2, 3, and 4.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 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