NetTalk Central

Author Topic: How to construct complex pages  (Read 4231 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
How to construct complex pages
« on: April 27, 2014, 08:23:47 PM »
Could someone give me advice about how to construct more complex pages - either point me to an example, or maybe 'The Book' or some home grown tips.

If you look at the attached picture you will see that I have a Browse that has no buttons for subsequent action (Change, Delete etc).  I have used the Browse really as a way to generate a report.  What I want to do next is to allow a button to be pressed which will execute code to draw a graph.  I would like the graph to appear beneath the Browse.

I know how to place graphs on a Form but not on a Browse.

So what needs to be done to allow this sort of 'Page' to be constructed (I do hope it is possible  ???)

Any comments appreciated,

Thanks

Keith

[attachment deleted by admin]
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: How to construct complex pages
« Reply #1 on: April 27, 2014, 09:23:31 PM »
NetWebPage is your friend. It can be configured to incorporate HTML fix page with JavaScript and NetTalk generated procedure (browse, forms). With ability to make some divs, tables and other HTML structures and using your .CSS you can design page to suit your needs.

I am not talented enough to make it so nice as I want it, but every day I improved my skills.

Best regards,

Djordje Radovanovic

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to construct complex pages
« Reply #2 on: April 27, 2014, 11:06:43 PM »
I avoid calling a browse on it's own. I always embed them on a memory netwebform. That way I can easily add more stuff like buttons etc to the form and position them where I want. It's just a habit now if I need more buttons or not.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: How to construct complex pages
« Reply #3 on: April 27, 2014, 11:48:00 PM »
I'm with Kevin on this one.

when you want to put multiple items together, then you need some sort of "container" - and I prefer a NetWebForm to a NetWebPage because a lot more of the interactions _between_ components are automated.

If you see a Browse as a "Control", then the concept of using that control on a Form, along with other Controls, becomes very natural.

Cheers
Bruce

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: How to construct complex pages
« Reply #4 on: April 28, 2014, 12:10:27 PM »
In NetWebForm there is no tab Scripts and CSS. This is advantage that I need so I vote for NetWebPage.

Best regards,

Djordje Radovanovic

 

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: How to construct complex pages
« Reply #5 on: April 28, 2014, 03:52:36 PM »
Thanks for the advice - this is a breakthrough idea, that the Form or Page provides a Container for doing complex things.

Taking Kevin's comment about a 'memory NetWebForm I have created a 'Scratch' memory table and defined a Form for it which actually has no fields displayed but which I have embedded a control which is a Browse etc.  This looks very promising.

Thanks again.

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: How to construct complex pages
« Reply #6 on: April 28, 2014, 11:13:10 PM »
Hi Djordje,

Using a page is not bad as a container - but the "components" on the page don't easily interact with each other (because they don't know each other exist.)

>> In NetWebForm there is no tab Scripts and CSS.

True. Because a form is itself a control, it is not a page. So it can't (easily) include custom CSS or JavaScript. But adding those items to the global list can be beneficial because

a) they are cached - so when the user gets to the page it goes faster and

b) They can be "combined" into all.js and all.css, which means fewer resources are fetched by the browser, and that is faster.

Which is not to say that the Page is bad - but using the right container in the right place makes life a lot easier later on.

cheers
Bruce


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to construct complex pages
« Reply #7 on: April 29, 2014, 04:14:57 PM »
Hi Keith,

just to clarify when you create netwebform procedure it asks if it is a table or memory in the templates. Memory does not mean memory table - you don't need any table. However, any code in startup should go into pre-update not pre-insert.

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: How to construct complex pages
« Reply #8 on: May 01, 2014, 12:40:57 AM »
Thanks Kevin for the clarification.  I didn't notice that difference.  Right at the moment I have an actual table which is a dummy file using the InMemory driver and this seems to work fine as a container.  I have got quite a long way with this with a Browse, Buttons and Graphs which is just what I wanted to achieve.  I do have a small 'layout' problem that I am going to ask about now.

Cheers

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27