PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: WinFBE 2.03 Tab Control  (Read 1167 times)

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
WinFBE 2.03 Tab Control
« on: February 18, 2020, 05:02:35 PM »

I tried to put 2 Tab controls on the same form and the designer confused the the second tab control with the first one.  I believe this is probably a bug.

Jim
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #1 on: February 18, 2020, 06:02:58 PM »

Thanks Jim - you are probably definitely correct. :)  I will test multiple tabs tomorrow to see what could be the problem.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
Re: WinFBE 2.03 Tab Control
« Reply #2 on: February 19, 2020, 09:50:54 AM »

I made a 5 tab control and then created a child form with a label and button on it.  I attached it to Tab 1 but I have been unable to see the child form displayed.  Am I missing a step?
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #3 on: February 19, 2020, 10:38:50 AM »

Hi Jim, firstly I want to let you know that I have fixed the tab control issue. You can now have multiple tab controls on a form, and, you can have tab controls on child forms for tab control pages. It seems to work well in my tests so far. I will have it available in the 2.0.5 update.

With regards to the steps for creating the tab control you should:
- Set the ResizeTabPages property of the ab control to TRUE.
- Set the ChildForm property of the child tab page form to TRUE.
- It appears that you have already "connected" the child tab page to the tab control via using the Custom property of the tab control (via th epopup customization dialog box).

Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #4 on: February 19, 2020, 02:14:45 PM »

Oh, and I almost forgot:

- You need to #Include a reference to the form in your main source code.

eg.

#Include Once "frmTabChild1.inc"

Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
Re: WinFBE 2.03 Tab Control
« Reply #5 on: February 19, 2020, 07:30:23 PM »

Thanks.  I will give it a shot.  The include file statement is what I omitted.
Logged

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
Re: WinFBE 2.03 Tab Control
« Reply #6 on: February 21, 2020, 12:10:26 AM »

Thanks for the tab control fix.  It appears to work fine now.  The problem with 2.05 now is the button control doesn't accept a change of text.  It goes berserk.

Jim
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #7 on: February 21, 2020, 09:34:45 AM »

The problem with 2.05 now is the button control doesn't accept a change of text.  It goes berserk.

Hi Jim, do you mean at design time when you are entering Text into the Button's Text property in the PropertyList, or do you mean at runtime when you try to update text via the Button.Text method call? If during runtime, then in what Event are you updating the Button (Form_Load, Form_Initialize, Form_Button_Click, etc).
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
Re: WinFBE 2.03 Tab Control
« Reply #8 on: February 21, 2020, 11:45:48 AM »

At design time (I had 2 tab controls on the form already which appear to operated as expected), I added a button control on the form and I was unable to edit the button text in the properties tab.  When I ran the code, the button had a desktop image in it.  My guess is that what ever you did to get the tab controls working broke the button when multiple tabs are on a form.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #9 on: February 21, 2020, 12:49:31 PM »

Thanks Jim, that's certainly interesting. Are you able to duplicate/replicate such behaviour consistently, or was it a one-time occurrence? I have not been able to create a similar case here that shows the Button behaving badly.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
Re: WinFBE 2.03 Tab Control
« Reply #10 on: February 21, 2020, 02:37:36 PM »

I will try again tonight with a new project and report back to you.
Logged

James Klutho

  • Senior Member
  • ***
  • Posts: 255
  • Petroleum Software Solutions
Re: WinFBE 2.03 Tab Control
« Reply #11 on: February 21, 2020, 10:46:29 PM »

Paul

Attached is the trouble project which was a small test.  I get the same results when I tried again.  Run the exe to see the result of the button.  May bethe project files will tell you something.  My steps where:

Create the project
Put 2 tab controls on it
Puts some tabs on each
Create a child form
Attach it to one of the tab controls
Create a menu
Create a toolbar and put an image or two on it
Create a status bar
Put a button on the main form and change it's text
Save the project
Put the include of the child form in the main form code after the application.run statement
Run the code

Hope this helps
Jim
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #12 on: February 22, 2020, 10:14:25 AM »

Hi Jim,

Thanks for taking the time to create the steps and to attach a sample project. I did not get any errors when I created a project based on your steps. Also, when I ran your EXE it seemed to look okay. However, when I loaded your attached sample project, I did notice a couple of things that seemed odd.

(1) There was no file designated as the "Main" file, so any attempted Compile would fail resulting in a warning that no Main file had been specified.

(2) In Form1 you have the the Application.Run(Form1) statement. Form1 is a child form and would not normally be the first form that you execute when starting a program. I assume that your frmMain.inc to execute first.

(3) I didn't see anywhere where the HomeBaseChild.bi form was #Included into the project.

If you initially created the Project using the menu Project / New Project and then select the Visual Designer template, the basic layout of a starter project will be created for you. It creates a "Main" .bas file, and a startup Form that is already coded as #Include in the Main .bas file. Basically, some of the annoying startup setup work in creating a new application is already done for you.

One thing that I have noticed that can trip people up (it's caused problems for me also) is that whenever you create a new Form it generates the following code in the code editor for that form:

''
''  Remove the following Application.Run code if it used elsewhere in your application.
Application.Run(Form1)

So, if you create many forms for your application then you could potentially have many Application.Run commands sprinkled throughout your code when you really should have only one. Failing to remove all but one of the Application.Run calls will result in phantom EXE's continuing to run on the background when you attempt to close your application. Task Manager would be the only way to find them and manually terminate those processes.

I will create a sample project based on your project and attach it here. That should only take a few minutes...
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #13 on: February 22, 2020, 10:30:24 AM »

Hi Jim,

Please find attached a version of your project that incorporates the elements that I discussed in my previous post.

One thing that I did notice is that when I save Images to the form files, I do create file names that relative to the project. They are essentially full path file names, therefore when you load the project you won't see the Toolbar icons displayed in the editor because the file names are based on the paths on my computer rather than yours. You will have to go into the Image Library and delete and re-add the icons and then reattach them to your Toolbar buttons. That's a major pain pain in the butt so I will fix WinFBE code to save files relate to project paths.

Once I have the final major visual designer control implemented (the TreeView), then I will embark on a campaign of documentation creation, tutorials, etc that will make everything a little bit easier for people to understand when getting started with the editor and/or the visual designer.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.03 Tab Control
« Reply #14 on: February 22, 2020, 12:23:37 PM »

I have made the change to store the image file names in the forms as relative to the Form names themselves. This should make it easier to share projects amongst others in the future.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer
Pages: [1] 2