Getting Started🔗
📦 Installation🔗
🔧 Library Files🔗
Ensure the following files are in your Clarion installation:
📁 LibSrc Directory🔗
libsrc\
├── TInteractiveFilter.INC # Class definitions and includes
├── TInteractiveFilter.CLW # Class implementation
└── TInteractiveFilter.TRN # Translation strings
📁 Template Directory🔗
template\
└── TInteractiveFilter.TPL # Template definitions
🎨 Icon Files🔗
images\
├── tint_FilterFor.ico
├── tint_FilterToggle.ico
├── tint_FilterBySelection.ico
├── tint_FilterExcludingSelection.ico
├── tint_FilterRemove.ico
├── tint_Empty.ico
├── tint_FreeFormQuery.ico
├── tint_LoadQuery.ico
└── tint_SaveQuery.ico
⚙️ Template Registration🔗
- Open Clarion IDE
- Template Registry → Register Template
- Browse to
TInteractiveFilter.TPL - Confirm registration
🚀 Basic Setup🔗
1️⃣ Enable Extension🔗
First, enable the Interactive Filter extension in your application:
- Application Properties → Extensions
- Add Extension → [TABOGA] Enables "InteractiveFilter" functionality
- Configure multi-DLL settings if applicable
! Extension automatically adds global includes:
INCLUDE('TInteractiveFilter.INC'),ONCE
2️⃣ Add to Browse Window🔗
Apply the control template to your browse procedure:
- Select Browse Procedure
- Window Designer → Controls
- Add Control → [TABOGA] Interactive Filter for browse
- Position the filter controls on your window
🎨 Default Controls Added🔗
BUTTON,AT(,,14,14),USE(?TFilterFor),ICON('tint_FilterFor.ico'),FLAT
CHECK,AT(14,0,14,14),USE(?TFilterToggle),ICON('tint_FilterToggle.ico'),FLAT
3️⃣ Configure Template🔗
📊 Query Tab🔗
- ✅ Filter by selection - Right-click equals filtering
- ✅ Filter excluding selection - Right-click not-equals filtering
- ✅ Filter for - Advanced filter dialog
- ✅ Remove Filter - Clear all filters
- ✅ Contains/Does Not Contain Pair - Context-sensitive options
🔧 Case Sensitivity🔗
- Force Case Sensitive - Exact case matching
- Force Case Insensitive - Ignore case (default)
- Manual - Driver-dependent default
💾 Filter Persistence🔗
☑ Allow saving and loading filters
Save procedure: TInteractiveFilter_SaveFilter
Load procedure: TInteractiveFilter_LoadFilter
4️⃣ Field Configuration🔗
🤖 Auto-Population (Recommended)🔗
☑ Auto Populate from BrowseBox
📝 Manual Configuration🔗
! Add fields manually
QBEField: CUS:Company
QBETitle: Company Name
QBEPicture: @s20
QBENoCase: Yes
🔄 Generated Code🔗
The template automatically generates the necessary integration code:
📋 Class Declaration🔗
TIF2 CLASS(TInteractiveFilterClass)
BrowseResetSort PROCEDURE(BYTE Force),DERIVED
BrowseSetFilter PROCEDURE(STRING Filter,STRING Id),DERIVED
InitComponents PROCEDURE(),BYTE,PROC,DERIVED
END
⚡ Initialization🔗
! Automatic initialization in ThisWindow.Init
TIF2.InitComponents
?TFilterToggle{PROP:Use} = TIF2.isInteractiveFilterOn
TIF2.InteractiveFilterToggleControl = ?TFilterToggle
DISABLE(?TFilterToggle)
TIF2.UpdateQuery(0) ! Auto-populate fields
TIF2.InitPopup ! Setup context menus
TIF2.CaseSensitivity = 0 ! Configure case handling
🎯 Event Handling🔗
! Filter button events
OF ?TFilterFor
x# = TIF2.FilterFor()
TIF2.FromButton = FALSE
OF ?TFilterToggle
IF TIF2.isInteractiveFilterOn AND TIF2.GetFilter()
TIF2.ApplyFilter()
ELSE
TIF2.DisableFilter()
END
🎨 UI Integration🔗
📊 Browse Popup Menu🔗
The template automatically adds context menu items:
- Filter by "Value" - Quick equal filter
- Filter excluding "Value" - Quick not-equal filter
- Contains "Value" - String contains filter
- On or before "Value" - Date/numeric comparison
- Filter for... - Advanced dialog
- Remove filter - Clear all filters
🔧 Visual Feedback🔗
- Toggle Button - Shows active filter state
- Filter Display - Optional current filter text
- Context-Sensitive Menus - Adapt to data type
✅ Verification🔗
After setup, verify the installation:
- Compile your application successfully
- Run and open a browse window
- Right-click on any column - see filter options
- Click the filter button - opens filter dialog
- Apply a filter - see toggle button activate
🚀 Next Steps🔗
- Tutorial - Detailed implementation walkthrough
- Template Guide - Advanced configuration options
- Examples - Real-world implementation examples
You're now ready to add powerful filtering capabilities to your browse windows!