Simple Browse tutorial

Return to Introduction  Previous page  Next page

In this tutorial you will learn how to use PowerToolbar to easily control your browses. This tutorial explains how to use a toolbar to control a browse in the same window. For advanced control across multiple threads, see the Advanced Browse tutorial.

 

The example below will set up a window with a browse and a toolbar to update it. You can find the finished application at: Clarion6\3rdParty\Examples\PowerToolbar\BrowseTutorial.app

 

brwtut_12

 

In this example you should use the dictionary named ptbexamples.dct

 

 

Simple Browse control tutorial

Onestep Create a new application (ABC)

 

Bullet Choose the ptbexample.dct from Clarion6\3rdParty\Examples\PowerToolbar as "Dictionary File".

 

brwtut_1

 

 

Onestep Add the global PowerToolbar template

Bullet See Adding the templates

 

 

Onestep Double click the "Main (Todo)"-procedure and choose "Browse - Browse Fields in a List Box" as template type

 

brwtut_2

 

 

Onestep Click the "Window" button and select "System Resizable Window" as window type.

 

brwtut_3

 

 

Onestep You should now be in the window formatter.

Bullet Click the "Control template" button (tplbutton)

Bullet Choose the "Browse Box - File-Browsing List Box"-template

   brwtut_4

 

Bullet Place it somewhere in your window

Bullet Choose the "Sample Table" as table, and "SAM:SampleText" as display field.

   brwtut_5

 

Bullet Click "Ok" in the list box formatter

 

 

Onestep Now you should add browse update buttons

Bullet Click the "Control template" button (tplbutton)

Bullet Choose the "BrowseUpdateButtons - Update records from a Browse Box"-template

   brwtut_6

 

Bullet Position the buttons over the browse box

Bullet Set buttons to "Hide"

   brwtut_7

 

Bullet On one of the button's action-tab, check the "Use Edit in-Place" option

   brwtut_8

 

 

Onestep Add PowerToolbar to your window

Bullet Click the "Control template" button (tplbutton)

Bullet Choose the "POToolbarControl - Toolbar Control"-template

   brwtut_9

 

Bullet Position at the top of your window

Bullet Right-click the toolbar control, and choose "Position"

Bullet Set Width to "Full"

 

 

Onestep Add toolbar band

 

Bullet Right-click the toolbar control, and choose "Actions"

Bullet Click the "Insert" button to add a band

Bullet Enter "Browse Control" as band name

   brwtut_10

 

Onestep Add toolbar buttons

 

Bullet Click the "Insert" button to add a button

Bullet Choose "MimicButton" as "Control type"

Bullet Enter "Insert" as "Name"

Bullet In the "Mimic Button"-dropdown, choose the "?Insert"-button

   brwtut_11

 

Bullet Click "Ok"

Bullet Now, repeat this step for the ?Change and ?Delete button

 

Onestep Save and compile your application

 

Onestep After starting your application, you can click the "insert" button to add a new record.

 

In this tutorial we used "Edit in-Place", but this method works just as well if you use an update form instead.

 

brwtut_12

 

 



Direct link to this page on our website: http://www.icetips.com/manuals/powertoolbar/browsecontrol.htm