Wednesday, December 5, 2007

Tip of the Day #2: Managing DB Navigator Properties in Forms

Section: Reports
Versions: R:BASE 7.6, C/S:I 7.6 and Turbo V-8 for Windows

Did you know that you can manage the DB Navigator Properties in
forms using the PROPERTY command?

Here's how:

01. Creating a DB Navigator Dynamically, On Demand!

    -- Example
    CREATEOBJECT DBNavigator 'Navigator' 'Panel' 100 90 200 20
    PROPERTY Navigator TblName 'Customer'
    PROPERTY Navigator INIT 'TRUE'
    PROPERTY Navigator ImageStyle 'Razzmatazz'
    PROPERTY Navigator FLAT 'TRUE'

02. Changing the DB Navigator Style:

    -- Syntax
     PROPERTY <DBNavigatorComponentID> ImageStyle 'value'

    -- Example 01:
     PROPERTY DBNavigator ImageStyle 'OLD'

    -- Example 02:
     PROPERTY DBNavigator ImageStyle 'Razzmatazz'

03. Making any of the default buttons visible/invisible:

    The default is Visible (TRUE).

    -- Syntax
     PROPERTY <DBNavigatorCompID> <ButtonType> 'value'

     Button Types:
     . FirstVisible
     . PriorVisible
     . NextVisible
     . LastVisible
     . InsertVisible
     . DeleteVisible
     . EditVisible
     . PostVisible
     . CancelVisible
     . RefreshVisible
     . CloseWindowVisible
     Values:
     . TRUE
     . FALSE

    -- Example 01 (To hide insert button):
    PROPERTY DBNavigator InsertVisible 'FALSE'

    -- Example 02 (To hide delete button):
    PROPERTY DBNavigator DeleteVisible 'FALSE'

04. Changing the hint for default buttons:

    -- Syntax
     PROPERTY <DBNavigatorCompID> <ButtonHint> 'hint text'

     Button Hint:
     . FirstHint
     . PriorHint
     . NextHint
     . LastHint
     . InsertHint
     . DeleteHint
     . EditHint
     . PostHint
     . CancelHint
     . RefreshHint
     . CloseWindowHint

    -- Example 01 (To change the hint for first button):
    PROPERTY DBNavigator FirstHint 'First Customer'

    -- Example 02 (To change the hint for previous button):
    PROPERTY DBNavigator PriorHint 'Previous Customer'

    -- Example 03 (To change the hint for next button):
    PROPERTY DBNavigator NextHint 'Next Customer'

    -- Example 04 (To change the hint for last button):
    PROPERTY DBNavigator LastHint 'Last Customer'

    -- Example 05 (To change the hint for post button):
    PROPERTY DBNavigator PostHint 'Save Changes'

Have fun!

Very Best R:egards,

Razzak.


Reply via email to