Using new Class TDeepSeek for documenting

User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

FWH Class TCheckbox documentation:
### Class Documentation: `TCheckBox`

#### Overview
The `TCheckBox` class is a subclass of `TControl` and represents a checkbox control in a FiveWin application. This class provides functionality to create, manage, and interact with checkbox controls, including handling user interactions, updating the checkbox state, and generating code for the checkbox.

#### Class Data (CLASSDATA)
- **`aProperties`**: An array of property names that define the attributes of the `TCheckBox` class. These properties include:
- `lChecked`: Indicates whether the checkbox is checked.
- `cVarName`: The variable name associated with the checkbox.
- `nClrText`: The text color of the checkbox.
- `nClrPane`: The background color of the checkbox.
- `nTop`: The top position of the checkbox.
- `nLeft`: The left position of the checkbox.
- `nWidth`: The width of the checkbox.
- `nHeight`: The height of the checkbox.
- `nAlign`: The alignment of the checkbox.
- `Cargo`: Additional data associated with the checkbox.

#### Methods

1. **`New( nRow, nCol, cCaption, bSetGet, oWnd, nWidth, nHeight, nHelpTopic, bChange, oFont, bValid, nClrFore, nClrBack, lDesign, lPixel, cMsg, lUpdate, bWhen, cVarName )`**
- **Description**: Constructor method for creating a new `TCheckBox` instance.
- **Parameters**:
- `nRow`, `nCol`: Position of the checkbox.
- `cCaption`: Text displayed next to the checkbox.
- `bSetGet`: Code block to get/set the checkbox state.
- `oWnd`: Parent window object.
- `nWidth`, `nHeight`: Dimensions of the checkbox.
- `nHelpTopic`: Help topic ID.
- `bChange`: Code block executed when the checkbox state changes.
- `oFont`: Font used for the checkbox text.
- `bValid`: Code block for validation.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lDesign`: Indicates if the checkbox is in design mode.
- `lPixel`: Indicates if dimensions are in pixels.
- `cMsg`: Tooltip text.
- `lUpdate`: Indicates if the checkbox should update its state.
- `bWhen`: Code block executed before the checkbox is activated.
- `cVarName`: Variable name for the checkbox.
- **Returns**: Self (the `TCheckBox` instance).

2. **`ReDefine( nId, bSetGet, oWnd, nHelpId, bChange, bValid, nClrFore, nClrBack, cMsg, lUpdate, bWhen, cPrompt )`**
- **Description**: Redefines an existing checkbox control.
- **Parameters**:
- `nId`: Control ID.
- `bSetGet`: Code block to get/set the checkbox state.
- `oWnd`: Parent window object.
- `nHelpId`: Help topic ID.
- `bChange`: Code block executed when the checkbox state changes.
- `bValid`: Code block for validation.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `cMsg`: Tooltip text.
- `lUpdate`: Indicates if the checkbox should update its state.
- `bWhen`: Code block executed before the checkbox is activated.
- `cPrompt`: Text displayed next to the checkbox.
- **Returns**: Self (the `TCheckBox` instance).

3. **`Click()`**
- **Description**: Handles the click event of the checkbox. Toggles the checkbox state and executes the `bChange` code block if defined.
- **Returns**: `nil`.

4. **`Default()`**
- **Description**: Sets the default state of the checkbox and applies the font.
- **Returns**: `nil`.

5. **`cToChar()`**
- **Description**: Returns the control type as a string ("BUTTON").
- **Returns**: String ("BUTTON").

6. **`EraseBkGnd( hDC )`**
- **Description**: Handles the background erasure of the checkbox.
- **Parameters**:
- `hDC`: Handle to the device context.
- **Returns**: `1` if themed, otherwise calls the superclass method.

7. **`KeyChar( nKey, nFlags )`**
- **Description**: Handles key press events. Moves focus to the next control on `VK_RETURN`.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.
- **Returns**: Result of the superclass method.

8. **`KeyDown( nKey, nFlags )`**
- **Description**: Handles key down events. Moves focus to the previous or next control on `VK_UP` or `VK_DOWN`.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.
- **Returns**: Result of the superclass method.

9. **`LostFocus( hCtl )`**
- **Description**: Handles the loss of focus event.
- **Parameters**:
- `hCtl`: Handle to the control gaining focus.
- **Returns**: Result of the superclass method.

10. **`Initiate( hDlg )`**
- **Description**: Initializes the checkbox control within a dialog.
- **Parameters**:
- `hDlg`: Handle to the dialog.
- **Returns**: `nil`.

11. **`MouseMove( nRow, nCol, nKeyFlags )`**
- **Description**: Handles mouse movement over the checkbox.
- **Parameters**:
- `nRow`, `nCol`: Mouse position.
- `nKeyFlags`: Key flags.
- **Returns**: `nil`.

12. **`Refresh()`**
- **Description**: Refreshes the checkbox state based on the `bSetGet` code block.
- **Returns**: `nil`.

13. **`Reset()`**
- **Description**: Resets the checkbox state to its default value.
- **Returns**: `nil`.

14. **`GenLocals()`**
- **Description**: Generates local variable declarations for the checkbox.
- **Returns**: String containing local variable declarations.

15. **`cGenPrg()`**
- **Description**: Generates the source code for the checkbox control.
- **Returns**: String containing the generated code.

16. **`Check()`**
- **Description**: Checks the checkbox.
- **Returns**: `nil`.

17. **`UnCheck()`**
- **Description**: Unchecks the checkbox.
- **Returns**: `nil`.

18. **`SaveToRC( nIndent )`**
- **Description**: Generates the resource script (RC) entry for the checkbox.
- **Parameters**:
- `nIndent`: Indentation level.
- **Returns**: String containing the RC entry.

19. **`SetCheck( lOnOff )`**
- **Description**: Sets the checkbox state based on the boolean parameter.
- **Parameters**:
- `lOnOff`: Boolean indicating whether to check or uncheck the checkbox.
- **Returns**: `nil`.

20. **`SetText( cText )`**
- **Description**: Sets the text of the checkbox.
- **Parameters**:
- `cText`: Text to set.
- **Returns**: `nil`.

21. **`lChecked()`**
- **Description**: Returns the current state of the checkbox.
- **Returns**: Boolean indicating whether the checkbox is checked.

22. **`Html()`**
- **Description**: Generates HTML for the checkbox.
- **Returns**: HTML string.

23. **`Display()`**
- **Description**: Displays the checkbox by painting it.
- **Returns**: `0`.

24. **`Paint()`**
- **Description**: Paints the checkbox.
- **Returns**: `1`.

#### Additional Notes
- The `TCheckBox` class is designed to be used within FiveWin applications, providing a robust and flexible way to handle checkbox controls.
- The class includes methods for both runtime and design-time functionality, making it suitable for use in both application development and form design tools.
- The class leverages FiveWin's event handling and rendering capabilities to provide a seamless user experience.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

FWH Class TClipboard documentation:
### Documentation for `TClipBoard` Class

The `TClipBoard` class is a utility class designed to interact with the Windows Clipboard. It provides methods to open, close, clear, and manipulate the clipboard's contents, including text, bitmaps, metafiles, and files. The class also supports Unicode text and provides methods to check if the clipboard is empty or contains specific types of data.

### Class Overview

- **Class Name**: `TClipBoard`
- **Purpose**: To manage and manipulate the Windows Clipboard, allowing for the transfer of various data types (text, bitmaps, metafiles, etc.) between applications.

### DATA Members

1. **`nFormat`**:
- **Type**: Numeric
- **Description**: Specifies the clipboard format to be used (e.g., `CF_TEXT`, `CF_BITMAP`, etc.). Default is `CF_TEXT`.

2. **`oWnd`**:
- **Type**: Object
- **Description**: Represents the window handle associated with the clipboard. If not provided, the desktop window handle is used.

### METHODS

1. **`New( nFormat, oWnd )`**:
- **Description**: Constructor method to initialize the `TClipBoard` object.
- **Parameters**:
- `nFormat`: The clipboard format (default is `CF_TEXT`).
- `oWnd`: The window handle (default is the main window or desktop window).
- **Returns**: Self (the `TClipBoard` object).

2. **`Clear()`**:
- **Description**: Clears the clipboard by opening it, emptying it, and then closing it.
- **Inline Implementation**: Calls `Open()`, `Empty()`, and `Close()` in sequence.

3. **`Open()`**:
- **Description**: Opens the clipboard for editing.
- **Inline Implementation**: Calls `OpenClipboard()` with the appropriate window handle.

4. **`Empty()`**:
- **Description**: Empties the clipboard, removing all data.
- **Inline Implementation**: Calls `EmptyClipboard()`.

5. **`Close()`**:
- **Description**: Closes the clipboard, making it available to other applications.
- **Inline Implementation**: Calls `CloseClipboard()`.

6. **`IsEmpty()`**:
- **Description**: Checks if the clipboard is empty for the specified format.
- **Returns**: `.T.` (true) if the clipboard is empty, `.F.` (false) otherwise.

7. **`SetData( uData )`**:
- **Description**: Sets data to the clipboard in the specified format.
- **Inline Implementation**: Calls `SetClipboardData()` with the specified format and data.

8. **`GetData()`**:
- **Description**: Retrieves data from the clipboard in the specified format.
- **Inline Implementation**: Calls `GetClpData()` with the specified format.

9. **`SetText( cText )`**:
- **Description**: Sets text data to the clipboard. Handles UTF-8 to UTF-16 conversion if necessary.
- **Returns**: `.T.` if successful, `.F.` otherwise.

10. **`SetWideText( cText )`**:
- **Description**: Sets wide (Unicode) text data to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

11. **`SetBitmap( oBitmap )`**:
- **Description**: Sets a bitmap to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

12. **`SetMetaFile( oMetaFile )`**:
- **Description**: Sets a metafile to the clipboard.
- **Returns**: `.T.` if successful, `.F.` otherwise.

13. **`GetBitmap()`**:
- **Description**: Retrieves a bitmap from the clipboard.
- **Returns**: The handle to the bitmap if successful, `0` otherwise.

14. **`GetText()`**:
- **Description**: Retrieves text data from the clipboard. Handles Unicode text if necessary.
- **Returns**: The retrieved text.

15. **`GetFiles()`**:
- **Description**: Retrieves a list of files from the clipboard (e.g., from a drag-and-drop operation).
- **Returns**: An array of file paths.

16. **`GetUnicodeText()`**:
- **Description**: Retrieves Unicode text from the clipboard.
- **Returns**: The retrieved Unicode text, converted to UTF-8 if necessary.

17. **`GetMetaFile()`**:
- **Description**: Retrieves a metafile from the clipboard.
- **Returns**: The handle to the metafile if successful, `0` otherwise.

18. **`End()`**:
- **Description**: Closes the clipboard.
- **Inline Implementation**: Calls `Close()`.

19. **`lUnicode` (ACCESS)**:
- **Description**: Checks if the clipboard is in Unicode mode.
- **Inline Implementation**: Returns `.T.` if Unicode is enabled, `.F.` otherwise.

### Additional Functions

1. **`GetClipContentFormat(...)`**:
- **Description**: Determines the clipboard format based on the provided parameters.
- **Returns**: The clipboard format.

2. **`FW_CopyToClipboard( cText )`**:
- **Description**: Copies the provided text to the clipboard.
- **Returns**: `nil`.

### Notes

- The class uses Windows API functions (`OpenClipboard`, `EmptyClipboard`, `CloseClipboard`, `SetClipboardData`, `GetClipboardData`, etc.) to interact with the clipboard.
- The class supports both ANSI and Unicode text, with automatic conversion between UTF-8 and UTF-16 where necessary.
- The `TClipBoard` class is designed to be used in a FiveWin environment, which is a framework for developing Windows applications in xBase languages (such as Clipper or Harbour).

### Example Usage

```xbase
// Copy text to clipboard
oClip := TClipBoard():New()
oClip:SetText("Hello, World!")
oClip:End()

// Retrieve text from clipboard
oClip := TClipBoard():New()
cText := oClip:GetText()
oClip:End()
? cText // Outputs: Hello, World!
```

This class provides a robust and flexible way to interact with the Windows Clipboard, making it easier to handle various data types in your applications.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

FWH Class TComboBox documentation:
### Class Documentation: `TComboBox`

#### Overview
The `TComboBox` class is a custom control class that extends the `TControl` class. It represents a combo box control, which is a combination of a drop-down list and an editable text box. This class provides functionality for managing items in the combo box, handling user interactions, and customizing the appearance and behavior of the combo box.

#### Data Members (Attributes)

1. **`aItems`**:
- **Type**: Array
- **Description**: Stores the list of items in the combo box.

2. **`aBitmaps`**:
- **Type**: Array
- **Description**: Stores bitmaps associated with the combo box items (used for owner-drawn combo boxes).

3. **`nItemHt`**:
- **Type**: Numeric
- **Description**: Height of the items in the combo box.

4. **`lOwnerDraw`**:
- **Type**: Logical
- **Description**: Indicates whether the combo box is owner-drawn.

5. **`nBmpHeight`**:
- **Type**: Numeric
- **Description**: Height of the bitmaps used in the combo box.

6. **`nBmpWidth`**:
- **Type**: Numeric
- **Description**: Width of the bitmaps used in the combo box.

7. **`nAt`**:
- **Type**: Numeric
- **Description**: Index of the currently selected item in the combo box.

8. **`bDrawItem`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle custom drawing of items in the combo box.

9. **`bCloseUp`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle the close-up event of the combo box.

10. **`bOwnerDraw`**:
- **Type**: Block (Code Block)
- **Description**: Code block to handle owner-drawn events.

11. **`cError`**:
- **Type**: String
- **Description**: Stores error messages related to the combo box.

12. **`oGet`**:
- **Type**: Object (TGet)
- **Description**: Reference to the associated `TGet` object for the combo box.

13. **`cSearchKey`**:
- **Type**: String
- **Description**: Holds the current search key for incremental search.

14. **`lIncSearch`**:
- **Type**: Logical
- **Description**: Indicates whether incremental search is enabled.

15. **`lCaseSensitive`**:
- **Type**: Logical
- **Description**: Indicates whether the search is case-sensitive.

16. **`nOldClrPane`**:
- **Type**: Numeric
- **Description**: Stores the old background color if the color changes with focus.

17. **`lDir`**:
- **Type**: Logical
- **Description**: Indicates whether the combo box is used for directory listing.

18. **`lSelDir`**:
- **Type**: Logical
- **Description**: Indicates whether a directory is selected.

19. **`cDir`**:
- **Type**: String
- **Description**: Stores the directory path for directory combo boxes.

20. **`nDirStyle`**:
- **Type**: Numeric
- **Description**: Style for directory combo boxes.

21. **`oSayDir`**:
- **Type**: Object (TSay)
- **Description**: Reference to the associated `TSay` object for directory combo boxes.

22. **`hSelectionHeight`**:
- **Type**: Numeric
- **Description**: Height of the selection area in the combo box.

23. **`hItemHeight`**:
- **Type**: Numeric
- **Description**: Height of the items in the combo box.

24. **`hDropWidth`**:
- **Type**: Numeric
- **Description**: Width of the drop-down list in the combo box.

25. **`lClrFocus`**:
- **Type**: Logical
- **Description**: Indicates whether the color changes when the combo box gets focus.

26. **`nClrFocus`**:
- **Type**: Numeric
- **Description**: Color to use when the combo box is focused.

27. **`aProperties`**:
- **Type**: Array
- **Description**: List of properties for the combo box.

#### Methods

1. **`New()`**:
- **Description**: Constructor method for creating a new `TComboBox` instance.
- **Parameters**:
- `nRow`, `nCol`: Position of the combo box.
- `bSetGet`: Code block for getting/setting the combo box value.
- `aItems`: Array of items to populate the combo box.
- `nWidth`, `nHeight`: Dimensions of the combo box.
- `oWnd`: Parent window.
- `nHelpId`: Help context ID.
- `bChange`, `bValid`: Code blocks for change and validation events.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lPixel`: Logical indicating whether dimensions are in pixels.
- `oFont`: Font object.
- `cMsg`: Tooltip message.
- `lUpdate`: Logical indicating whether to update the combo box.
- `bWhen`: Code block for the "when" event.
- `lDesign`: Logical indicating whether the combo box is in design mode.
- `acBitmaps`: Array of bitmaps for owner-drawn combo boxes.
- `bDrawItem`: Code block for custom drawing.
- `nStyle`: Style of the combo box.
- `cPict`: Picture clause for the combo box.
- `bEChange`: Code block for edit change event.
- `cVarName`: Variable name for the combo box.
- `nHGet`: Height of the combo box.
- `nSelHt`, `nItmHt`: Selection and item heights.
- `nListWidth`: Width of the drop-down list.
- `cDir`: Directory path for directory combo boxes.
- `nAttr`: Attributes for directory combo boxes.
- `oSayDir`: Associated `TSay` object for directory combo boxes.
- `bOwnerDraw`: Code block for owner-drawn events.

2. **`ReDefine()`**:
- **Description**: Redefines an existing combo box.
- **Parameters**: Similar to `New()`.

3. **`Add()`**:
- **Description**: Adds an item to the combo box.
- **Parameters**:
- `cItem`: Item to add.
- `nAt`: Position to add the item.

4. **`GenLocals()`**:
- **Description**: Generates local variables for the combo box.

5. **`cGenPrg()`**:
- **Description**: Generates the code for the combo box in a program.

6. **`Change()`**:
- **Description**: Handles the change event of the combo box.

7. **`Close()`**:
- **Description**: Closes the drop-down list of the combo box.

8. **`CloseUp()`**:
- **Description**: Handles the close-up event of the combo box.

9. **`DropDown()`**:
- **Description**: Handles the drop-down event of the combo box.

10. **`CtlColor()`**:
- **Description**: Handles the control color event.

11. **`Default()`**:
- **Description**: Sets default values for the combo box.

12. **`DefControl()`**:
- **Description**: Defines a control within the combo box.

13. **`Del()`**:
- **Description**: Deletes an item from the combo box.
- **Parameters**:
- `nAt`: Position of the item to delete.

14. **`Destroy()`**:
- **Description**: Destroys the combo box and releases resources.

15. **`DrawItem()`**:
- **Description**: Handles custom drawing of items in the combo box.
- **Parameters**:
- `nIdCtl`: Control ID.
- `nPStruct`: Pointer to the draw item structure.

16. **`End()`**:
- **Description**: Ends the combo box and hides it.

17. **`FillMeasure()`**:
- **Description**: Measures the items in the combo box.

18. **`FindString()`**:
- **Description**: Finds a string in the combo box.
- **Parameters**:
- `cItem`: Item to find.
- `nFrom`: Starting position for the search.

19. **`Find()`**:
- **Description**: Checks if an item exists in the combo box.
- **Parameters**:
- `cItem`: Item to find.
- `nFrom`: Starting position for the search.

20. **`GetKeyChar()`**:
- **Description**: Handles key character events.
- **Parameters**:
- `nKey`: Key code.

21. **`GetMinVisible()`**:
- **Description**: Gets the minimum number of visible items in the combo box.

22. **`GotFocus()`**:
- **Description**: Handles the focus event of the combo box.

23. **`HandleEvent()`**:
- **Description**: Handles events for the combo box.
- **Parameters**:
- `nMsg`: Message ID.
- `nWParam`: WPARAM value.
- `nLParam`: LPARAM value.

24. **`Initiate()`**:
- **Description**: Initializes the combo box.
- **Parameters**:
- `hDlg`: Handle to the dialog.

25. **`Insert()`**:
- **Description**: Inserts an item into the combo box.
- **Parameters**:
- `cItem`: Item to insert.
- `nAt`: Position to insert the item.

26. **`IsClosed()`**:
- **Description**: Checks if the combo box is closed.

27. **`IsOpen()`**:
- **Description**: Checks if the combo box is open.

28. **`KeyChar()`**:
- **Description**: Handles key character events.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.

29. **`KeyDown()`**:
- **Description**: Handles key down events.
- **Parameters**:
- `nKey`: Key code.
- `nFlags`: Key flags.

30. **`LostFocus()`**:
- **Description**: Handles the lost focus event.
- **Parameters**:
- `hWndGetFocus`: Handle to the window that gets focus.

31. **`lValid()`**:
- **Description**: Validates the combo box.

32. **`Modify()`**:
- **Description**: Modifies an item in the combo box.
- **Parameters**:
- `cItem`: New item value.
- `nAt`: Position of the item to modify.

33. **`MouseMove()`**:
- **Description**: Handles mouse move events.
- **Parameters**:
- `nRow`, `nCol`: Mouse coordinates.
- `nKeyFlags`: Key flags.

34. **`Open()`**:
- **Description**: Opens the drop-down list of the combo box.

35. **`Refresh()`**:
- **Description**: Refreshes the combo box.

36. **`Reset()`**:
- **Description**: Resets the combo box.
- **Parameters**:
- `lChanged`: Logical indicating whether to trigger the change event.

37. **`Select()`**:
- **Description**: Selects an item in the combo box.
- **Parameters**:
- `nItem`: Index of the item to select.

38. **`Set()`**:
- **Description**: Sets the value of the combo box.
- **Parameters**:
- `cNewItem`: New value to set.

39. **`SetBitmaps()`**:
- **Description**: Sets bitmaps for the combo box.
- **Parameters**:
- `acBitmaps`: Array of bitmaps.

40. **`SetColorFocus()`**:
- **Description**: Sets the focus color for the combo box.
- **Parameters**:
- `nClrFocus`: Color to set.

41. **`SetItems()`**:
- **Description**: Sets the items in the combo box.
- **Parameters**:
- `aItems`: Array of items.
- `lChanged`: Logical indicating whether to trigger the change event.

42. **`SetMinVisible()`**:
- **Description**: Sets the minimum number of visible items in the combo box.
- **Parameters**:
- `nItems`: Number of items.

43. **`ShowToolTip()`**:
- **Description**: Shows a tooltip for the combo box.

44. **`VarGet()`**:
- **Description**: Gets the value of the combo box.

45. **`State()`**:
- **Description**: Gets the state of the combo box (open or closed).

46. **`HGet()`**:
- **Description**: Sets the height of the combo box.
- **Parameters**:
- `nHeight`: Height to set.

47. **`nSelectionHeight()`**:
- **Description**: Gets or sets the selection height of the combo box.
- **Parameters**:
- `nNew`: New selection height.

48. **`nItemHeight()`**:
- **Description**: Gets or sets the item height of the combo box.
- **Parameters**:
- `nNew`: New item height.

49. **`nDropWidth()`**:
- **Description**: Gets or sets the drop-down width of the combo box.
- **Parameters**:
- `nNew`: New drop-down width.

50. **`GetSelText()`**:
- **Description**: Gets the selected text in the combo box.

51. **`SetDir()`**:
- **Description**: Sets the directory for directory combo boxes.
- **Parameters**:
- `cDir`: Directory path.
- `nType`: Directory style.

52. **`SetFont()`**:
- **Description**: Sets the font for the combo box.
- **Parameters**:
- `oFont`: Font object.

#### Additional Notes
- The `TComboBox` class is designed to be highly customizable, allowing for owner-drawn items, custom event handling, and integration with other controls like `TGet` and `TSay`.
- The class supports incremental search, directory listing, and various styles and behaviors typical of combo boxes in Windows applications.
- The class also includes methods for handling focus, color changes, and tooltips, making it a versatile control for user interfaces.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

FWH Class TComboMetro documentation:
### Class Documentation: `TComboMetro`

#### Overview
The `TComboMetro` class is a custom control class derived from `TControl`. It represents a Metro-style combo box control, which is a graphical user interface element that allows users to select an item from a dropdown list. This class provides functionality for handling user interactions, displaying items, and managing the visual appearance of the combo box.

#### Data Members (DATAs)

1. **`lRegistered` (CLASSDATA)**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the class has been registered. This is a class-level data member.

2. **`nMargin`**
- **Type:** `NUMERIC`
- **Description:** The margin size around the combo box. Initialized to `8`.

3. **`oWndParent`**
- **Type:** `OBJECT`
- **Description:** Reference to the parent window of the combo box.

4. **`nClrBorder`**
- **Type:** `NUMERIC`
- **Description:** The color of the combo box border. Initialized to `CLR_GRAY`.

5. **`lWorking`, `lBtnUp`, `lBtnDown`, `lPressed`**
- **Type:** `LOGICAL`
- **Description:** Flags to track the state of the combo box (e.g., whether it is being interacted with, whether a button is pressed, etc.).

6. **`lBorder`**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the combo box has a border. Initialized to `.f.` (false).

7. **`hPenButton`**
- **Type:** `HANDLE`
- **Description:** Handle to the pen used for drawing the combo box button.

8. **`nAt`**
- **Type:** `NUMERIC`
- **Description:** The index of the currently selected item in the combo box.

9. **`aItems`**
- **Type:** `ARRAY`
- **Description:** An array containing the items to be displayed in the combo box.

10. **`lNumeric`**
- **Type:** `LOGICAL`
- **Description:** Indicates whether the combo box items are numeric. Initialized to `.f.` (false).

#### Methods

1. **`New( nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId, bChange, bValid, nClrFore, nClrBack, lPixel, oFont, cMsg, lUpdate, bWhen, lDesign )`**
- **Description:** Constructor method for the `TComboMetro` class. Initializes the combo box with the specified parameters.
- **Parameters:**
- `nRow`, `nCol`: Position of the combo box.
- `bSetGet`: Code block to get/set the combo box value.
- `aItems`: Array of items to display.
- `nWidth`, `nHeight`: Dimensions of the combo box.
- `oWnd`: Parent window.
- `nHelpId`: Help ID for the combo box.
- `bChange`: Code block to execute when the combo box value changes.
- `bValid`: Code block to validate the combo box value.
- `nClrFore`, `nClrBack`: Foreground and background colors.
- `lPixel`: Indicates whether dimensions are in pixels.
- `oFont`: Font to use for the combo box.
- `cMsg`: Tooltip message.
- `lUpdate`: Indicates whether to update the combo box value.
- `bWhen`: Code block to execute before the combo box is activated.
- `lDesign`: Indicates whether the combo box is in design mode.

2. **`Initiate( hDlg )`**
- **Description:** Initializes the combo box control within a dialog.
- **Parameters:**
- `hDlg`: Handle to the dialog.

3. **`Default()`**
- **Description:** Sets the default value for the combo box based on the current selection.

4. **`Destroy()`**
- **Description:** Destroys the combo box control and releases associated resources.

5. **`GotFocus( hCtlLost )`**
- **Description:** Handles the event when the combo box gains focus.
- **Parameters:**
- `hCtlLost`: Handle to the control that lost focus.

6. **`LostFocus( hWndGetFocus )`**
- **Description:** Handles the event when the combo box loses focus.
- **Parameters:**
- `hWndGetFocus`: Handle to the control that gained focus.

7. **`Set( cNewItem )`**
- **Description:** Sets the selected item in the combo box.
- **Parameters:**
- `cNewItem`: The new item to select.

8. **`Refresh()`**
- **Description:** Refreshes the combo box display.

9. **`Click()`**
- **Description:** Handles the click event on the combo box.

10. **`Display()`**
- **Description:** Displays the combo box by painting it.

11. **`Paint()`**
- **Description:** Paints the combo box on the screen.

12. **`LButtonDown( nRow, nCol, nFlags, lTouch )`**
- **Description:** Handles the left mouse button down event.
- **Parameters:**
- `nRow`, `nCol`: Coordinates of the mouse click.
- `nFlags`: Flags indicating the state of the mouse buttons.
- `lTouch`: Indicates whether the event was triggered by a touch input.

13. **`LButtonUp( nRow, nCol )`**
- **Description:** Handles the left mouse button up event.
- **Parameters:**
- `nRow`, `nCol`: Coordinates of the mouse click.

14. **`KeyChar( nKey, nFlags )`**
- **Description:** Handles key press events.
- **Parameters:**
- `nKey`: The key code of the pressed key.
- `nFlags`: Flags indicating the state of the keyboard.

#### Additional Notes
- The `TComboMetro` class is designed to be used in a graphical user interface (GUI) environment, where it provides a dropdown list for user selection.
- The class includes methods for handling user interactions, such as mouse clicks and key presses, and for managing the visual appearance of the combo box.
- The `TX8` class is a helper class used internally by `TComboMetro` to manage the dropdown list and handle scrolling and selection within the list.

This documentation provides a comprehensive overview of the `TComboMetro` class, its data members, and methods, along with a brief description of each.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

FWH Class TControl documentation:
### **Class Documentation: `TControl`**

The `TControl` class is a fundamental class in the FiveWin library, which is used for creating and managing GUI controls in Windows applications. It inherits from the `TWindow` class and provides a wide range of functionalities for handling user interactions, resizing, dragging, and other control-related operations.

This class is designed to be the base class for various GUI controls like buttons, checkboxes, textboxes, etc. It includes methods and data members that allow for customization, event handling, and control manipulation.

---

### **Key Features**
- **Drag and Drop Support**: The class supports dragging controls within the window, with grid alignment and resizing capabilities.
- **Event Handling**: It provides methods to handle mouse events, keyboard events, and focus changes.
- **Customizable Properties**: The class allows for customization of control properties such as size, position, alignment, and appearance.
- **Dynamic Resizing**: Controls can be resized dynamically, with support for relative and absolute positioning.
- **Transparency and 3D Look**: The class supports transparent controls and a 3D look for controls.

---

### **Data Members**

#### **Control State and Behavior**
- **`bSetGet`**: A codeblock used to get or set the value of the control.
- **`bChange`**: A codeblock executed when the control's value changes.
- **`bDragBegin`**: A codeblock executed when dragging begins.
- **`lCaptured`**: Logical flag indicating whether the control has captured the mouse.
- **`lDrag`**: Logical flag indicating whether the control is in drag mode.
- **`lMouseDown`**: Logical flag indicating whether the mouse button is pressed on the control.
- **`lUpdate`**: Logical flag indicating whether the control should be updated.
- **`l3DLook`**: Logical flag indicating whether the control has a 3D look.
- **`nLastRow`, `nLastCol`**: Numeric values storing the last mouse position.
- **`nMResize`**: Numeric value indicating the type of mouse resizing (e.g., RES_NW, RES_N, etc.).
- **`nDlgCode`**: Numeric value returned by `GetDlgCode()` for default behavior.
- **`oJump`**: Reference to the next control to focus after validation.
- **`l97Look`**: Logical flag indicating whether the control has a Windows 97 look.
- **`bSysKeyDown`**: A codeblock executed when a system key is pressed.
- **`bPreDelControl`, `bPostDelControl`**: Codeblocks executed before and after deleting the control.
- **`bDrag`, `bPostDrag`, `bPreDrag`**: Codeblocks executed during and after dragging.
- **`nClientBevel`**: Numeric value indicating the bevel size of the client area.
- **`lTransparent`**: Logical flag indicating whether the control is transparent.
- **`aSizeRect`**: Array storing the size and position of the control.
- **`ResizeType`**: String indicating the type of resizing (e.g., "NW", "NE", etc.).
- **`LastValidValue`**: The last valid value of the control (read-only).
- **`uOriginalValue`**: The original value of the control (read-only).

#### **Class Variables**
- **`nInitID`**: Static numeric value used to generate unique control IDs.
- **`nPoint`**: Static numeric value used for mouse position tracking.
- **`aDots`**: Static array storing the dots used for resizing controls in design mode.
- **`aProperties`**: Static array listing the properties of the control (e.g., `cTitle`, `cVarName`, etc.).
- **`bDelete`**: Static codeblock executed when deleting a control.

---

### **Methods**

#### **Control Positioning and Sizing**
- **`nTop(nNewTop)`**: Gets or sets the top position of the control.
- **`nLeft(nNewLeft)`**: Gets or sets the left position of the control.
- **`AdjBottom()`**: Adjusts the bottom position of the control.
- **`AdjClient()`**: Adjusts the client area of the control.
- **`AdjLeft()`**: Adjusts the left position of the control.
- **`AdjRight()`**: Adjusts the right position of the control.
- **`AdjTop()`**: Adjusts the top position of the control.
- **`Move(nTop, nLeft, nWidth, nHeight, lRepaint)`**: Moves the control to a new position and size.
- **`CalcSize(nTop, nLeft, nWidth, nHeight, lRelative, oWnd, nBottom, nRight)`**: Calculates the size and position of the control relative to its parent window.

#### **Event Handling**
- **`Change()`**: Virtual method called when the control's value changes.
- **`ChangeFocus()`**: Changes the focus to the next control.
- **`Click()`**: Handles the click event of the control.
- **`LDblClick(nRow, nCol, nFlags)`**: Handles the double-click event of the control.
- **`LButtonDown(nRow, nCol, nKeyFlags, lTouch)`**: Handles the left mouse button down event.
- **`LButtonUp(nRow, nCol, nKeyFlags)`**: Handles the left mouse button up event.
- **`MouseMove(nRow, nCol, nKeyFlags)`**: Handles the mouse move event.
- **`KeyChar(nKey, nFlags)`**: Handles the key press event.
- **`KeyDown(nKey, nFlags)`**: Handles the key down event.
- **`KeyUp(nKey, nFlags)`**: Handles the key up event.
- **`SysChar(nKey, nFlags)`**: Handles the system character event.
- **`SysKeyDown(nKey, nFlags)`**: Handles the system key down event.

#### **Focus and Validation**
- **`GotFocus(hCtlLost)`**: Handles the focus gain event.
- **`LostFocus(hWndGetFocus)`**: Handles the focus loss event.
- **`lValid()`**: Validates the control's value.
- **`ForWhen()`**: Evaluates the `WHEN` clause of the control.

#### **Drag and Drop**
- **`DragBegin(nRow, nCol, nKeyFlags)`**: Begins the drag operation.
- **`MResize(nType, nRow, nCol, oDot)`**: Resizes the control using the mouse.
- **`ShowDots()`**: Shows the resize dots around the control.
- **`HideDots()`**: Hides the resize dots.

#### **Rendering and Appearance**
- **`Paint()`**: Virtual method for painting the control.
- **`PaintBack(hDC)`**: Paints the background of the control.
- **`EraseBkGnd(hDC)`**: Erases the background of the control.
- **`Colors(hDC)`**: Sets the text and background colors of the control.
- **`Set3DLook(lOnOff)`**: Enables or disables the 3D look of the control.

#### **Utility Methods**
- **`cToChar(cCtrlClass)`**: Converts the control to a character representation.
- **`GenLocals()`**: Generates local variables for the control.
- **`GetCtrlIndex()`**: Returns the index of the control in its parent window.
- **`Html()`**: Returns an empty string (placeholder for HTML representation).
- **`Init()`**: Virtual method for initializing the control.
- **`Initiate(hDlg)`**: Initializes the control within a dialog.
- **`Default()`**: Sets default values for the control.
- **`GetDlgCode(nLastKey)`**: Returns the dialog code for the control.
- **`GetNewId()`**: Generates a new unique ID for the control.
- **`Inspect(cDataName)`**: Inspects the control's properties.
- **`VarPut(uVal)`**: Sets the value of the control.
- **`VarGet()`**: Gets the value of the control.

#### **System Commands**
- **`SysCommand(nType, nLoWord, nHiWord)`**: Handles system commands like Alt+key combinations.
- **`HandleEvent(nMsg, nWParam, nLParam)`**: Handles various Windows messages.

---

### **Additional Notes**
- The class supports **grid-based resizing** and **dragging** of controls, which is useful in design mode.
- It provides **transparency** and **3D look** options for controls.
- The class is designed to work seamlessly with **FiveWin's event-driven architecture**, making it easy to handle user interactions.

---

### **Example Usage**
```xBase
// Create a new TControl instance
oControl := TControl():New()

// Set the control's position and size
oControl:Move(100, 100, 200, 50)

// Enable dragging
oControl:lDrag := .T.

// Handle the click event
oControl:bLClicked := { || MsgInfo("Control Clicked!") }

// Add the control to a window
oWnd:AddControl(oControl)
```

This class is a cornerstone of the FiveWin library, providing the foundation for creating interactive and customizable GUI controls in Windows applications.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

documenta esta clase proporcionando una explicación general de la misma, asi como listando todas sus DATAs y Métodos asi como una descripción de cada uno de ellos, describiendo cada parámetro usado asi como el valor de retorno. A ser posible proporciona un breve ejemplo de uso de cada método.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

FWH Class TXBrowse documentation

Generated with https://aistudio.google.com/prompts/new_chat and the new Gemini Flash 2.0 Thinking Experimental 01-21

Gemini requires a PDF so in order to generate it we opened the PRG from Chrome then printed it as a PDF.

Code: Select all | Expand

Methods of the TXBrowse Class

Here's a detailed list of the methods of the TXBrowse class, including parameters, return values, and usage examples:

1. New( oWnd )

Description: Constructor for the TXBrowse class. Creates a new TXBrowse object as a child of the specified window.

Parameters:

oWnd: OBJECT - The parent TWindow object for the browse control.

Return Value: OBJECT - Returns the newly created TXBrowse object (Self).

Usage Example:

oBrw := TXBrowse():New( oWnd )
content_copy
download
Use code with caution.
Harbour

2. Destroy()

Description: Destructor for the TXBrowse class. Releases resources associated with the browse control, including bitmaps, pens, brushes, and data connections.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Destroy()
content_copy
download
Use code with caution.
Harbour

3. SetStyle( nStyle )

Description: Sets the visual style of the browse control.

Parameters:

nStyle: NUMERIC or CODEBLOCK - Style number (e.g., 2007, flat) or a codeblock that returns a color gradient specification.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetStyle( 2007 ) // Sets the style to the 2007 visual style.
oBrw:SetStyle( { |lInvert| { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, { 2/3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } } ) // Sets a custom gradient.
content_copy
download
Use code with caution.
Harbour

4. SetDarkTheme( nTheme )

Description: Sets the browse control to a dark theme appearance.

Parameters:

nTheme: NUMERIC - Theme number (currently only 1 is supported for dark theme).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetDarkTheme( 1 ) // Enables dark theme.
content_copy
download
Use code with caution.
Harbour

5. SetRecSelBmp( uNew )

Description: Sets the bitmap used for the record selector triangle.

Parameters:

uNew: CHARACTER or NUMERIC - Path to a bitmap file or 0 to use the default arrow bitmap or NIL for no bitmap.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRecSelBmp( "myarrow.bmp" ) // Sets a custom bitmap for record selector.
oBrw:SetRecSelBmp( 0 ) // Uses default arrow bitmap.
oBrw:SetRecSelBmp( nil ) // Removes the bitmap.
content_copy
download
Use code with caution.
Harbour

6. SetRecSelSl( nType )

Description: Sets the record selector to display either record numbers or key numbers.

Parameters:

nType: NUMERIC - 1 to display record numbers (RecNo), 2 to display key numbers (KeyNo), or any other value to display nothing.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRecSelSl( 1 ) // Displays record numbers in the selector column.
oBrw:SetRecSelSl( 2 ) // Displays key numbers in the selector column.
oBrw:SetRecSelSl( 0 ) // Hides the record number/key number display.
content_copy
download
Use code with caution.
Harbour

7. SetRightFreeze( oCol )

Description: Sets a column as the right-freeze column, which remains visible when horizontally scrolling.

Parameters:

oCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to be frozen on the right side, or NIL to remove right-freeze column.

Return Value: OBJECT - Returns the right-freeze TxBrwColumn object or NIL if no right-freeze column is set.

Usage Example:

oBrw:SetRightFreeze( oBrw:aCols[ 3 ] ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( 3 ) // Freezes the 3rd column on the right.
oBrw:SetRightFreeze( nil ) // Removes any right-freeze column.
content_copy
download
Use code with caution.
Harbour

8. nAt()

Description: Returns the index of the currently selected column within the displayed columns array.

Parameters: None

Return Value: NUMERIC - Index of the selected column in aDisplay array.

Usage Example:

nColIndex := oBrw:nAt()
content_copy
download
Use code with caution.
Harbour

9. EraseBkGnd()

Description: Erases the background of the browse control.

Parameters: None

Return Value: NUMERIC - Always returns 1.

Usage Example:

oBrw:EraseBkGnd()
content_copy
download
Use code with caution.
Harbour

10. cGenPrg( lDlgUnits )

Description: Generates a code snippet (PRG code) to recreate the browse control with its current settings.

Parameters:

lDlgUnits: LOGICAL - Flag indicating if dialog units should be used for size and position.

Return Value: CHARACTER - String containing the generated PRG code.

Usage Example:

cPrgCode := oBrw:cGenPrg( .T. ) // Generates PRG code using dialog units.
content_copy
download
Use code with caution.
Harbour

11. SetRDD( lAddColumns, lAutoOrder, aFldNames, aRows )

Description: Sets the data source to an RDD (e.g., DBF database).

Parameters:

lAddColumns: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.

lAutoOrder: LOGICAL - .T. to enable automatic ordering based on index tags, .F. otherwise.

aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).

aRows: ARRAY - Array data (optional, if array data is used instead of RDD).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetRDD( .T., .T. ) // Sets DBF as datasource, automatically adding columns and enabling auto-order.
oBrw:SetRDD( .F., .F., { "FIELD1", "FIELD2" } ) // Sets DBF and specifies columns to add.
content_copy
download
Use code with caution.
Harbour

12. SQLRDD_OrdKeyNo( n )

Description: Sets or gets the order key number for SQLRDD data source.

Parameters:

n: NUMERIC - Order key number to set (optional).

Return Value: NUMERIC - Returns the current order key number.

Usage Example:

nKeyNo := oBrw:SQLRDD_OrdKeyNo() // Gets current order key number.
oBrw:SQLRDD_OrdKeyNo( 5 ) // Sets the order key number to 5.
content_copy
download
Use code with caution.
Harbour

13. SQLRDD_OrdkeyGoto( n )

Description: Moves the record pointer in SQLRDD to the specified order key number.

Parameters:

n: NUMERIC - Order key number to go to.

Return Value: None

Usage Example:

oBrw:SQLRDD_OrdkeyGoto( 10 ) // Moves to order key number 10.
content_copy
download
Use code with caution.
Harbour

14. SQLRDD_CalcKeyNo()

Description: Recalculates and returns the current key number for SQLRDD data source.

Parameters: None

Return Value: NUMERIC - Returns the calculated key number.

Usage Example:

nKeyNo := oBrw:SQLRDD_CalcKeyNo()
content_copy
download
Use code with caution.
Harbour

15. SQLRDD_BookMark( nGoTo )

Description: Sets or gets a bookmark for SQLRDD data source based on record number.

Parameters:

nGoTo: NUMERIC - Record number to bookmark (optional).

Return Value: NUMERIC - Returns the current bookmark value (record number).

Usage Example:

nBookmark := oBrw:SQLRDD_BookMark() // Gets current bookmark.
oBrw:SQLRDD_BookMark( 25 ) // Sets bookmark to record number 25.
content_copy
download
Use code with caution.
Harbour

16. SQLRDD_Skipper( n )

Description: Skips records forward or backward in SQLRDD data source.

Parameters:

n: NUMERIC - Number of records to skip (positive for forward, negative for backward).

Return Value: NUMERIC - Returns the number of records actually skipped.

Usage Example:

nSkipped := oBrw:SQLRDD_Skipper( 10 ) // Skips 10 records forward.
nSkipped := oBrw:SQLRDD_Skipper( -5 ) // Skips 5 records backward.
content_copy
download
Use code with caution.
Harbour

17. SQLRDD_Adjust()

Description: Adjusts the browse control for SQLRDD data source (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

18. SQLRDD_SaveState()

Description: Saves the state of the browse control for SQLRDD data source (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

19. ResetData( uSrc, aCols )

Description: Resets the browse control's data and columns.

Parameters:

uSrc: - New data source (can be array, DBF alias, or other supported types).

aCols: ARRAY - Array of column specifications for the new data (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ResetData( "NEW_DBF_ALIAS" ) // Resets data to a new DBF alias.
oBrw:ResetData( myNewArray, myColumnSpecs ) // Resets data to a new array with specified columns.
content_copy
download
Use code with caution.
Harbour

20. SetArray( aData, lAutoOrder, nColOrder, aCols, bOnSkip )

Description: Sets the data source to an array.

Parameters:

aData: ARRAY - Two-dimensional array containing the data to display.

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

nColOrder: NUMERIC - Column index to order the array data by (if lAutoOrder is .T.).

aCols: ARRAY - Array of column specifications (optional).

bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetArray( myDataArray, .T., 2 ) // Sets array data, enables auto-order by 2nd column.
oBrw:SetArray( myDataArray, .F., , myColumnSpecs ) // Sets array data with custom column specs.
content_copy
download
Use code with caution.
Harbour

21. SetoDbf( oDbf, aCols, lAutoSort, lAutoCols, aRows )

Description: Sets the data source to an ODBF object.

Parameters:

oDbf: OBJECT - ODBF object representing the database table.

aCols: ARRAY - Array of column specifications (optional).

lAutoSort: LOGICAL - .T. to enable auto-sorting, .F. otherwise.

lAutoCols: LOGICAL - .T. to automatically add columns based on DBF fields, .F. otherwise.

aRows: ARRAY - Array data (optional, if array data is used instead of DBF).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetoDbf( myDbfObject, myColumnSpecs, .T., .F. ) // Sets ODBF object as datasource with custom columns and auto-sorting enabled.
content_copy
download
Use code with caution.
Harbour

22. SetExcelRange( oRange, lHeaders, aCols )

Description: Sets the data source to an Excel range object.

Parameters:

oRange: OBJECT - Excel Range object.

lHeaders: LOGICAL - .T. if the first row of the range contains headers, .F. otherwise.

aCols: ARRAY - Array of column specifications (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetExcelRange( myExcelRange, .T. ) // Sets Excel range as data source with headers.
content_copy
download
Use code with caution.
Harbour

23. SetAdo( oRs, lAddCols, lAutoOrder, aFldNames )

Description: Sets the data source to an ADO recordset object.

Parameters:

oRs: OBJECT - ADO Recordset object.

lAddCols: LOGICAL - .T. to automatically add columns based on recordset fields, .F. otherwise.

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

aFldNames: ARRAY - Array of field names to include as columns (optional, if lAddColumns is .T.).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetAdo( myAdoRecordset, .T., .T. ) // Sets ADO recordset as data source with auto-columns and auto-order.
content_copy
download
Use code with caution.
Harbour

24. SetTree( oTree, aResource, bOnSkip, aCols )

Description: Sets the data source to a Tree object.

Parameters:

oTree: OBJECT - Tree object.

aResource: - Resource for tree bitmaps (optional).

bOnSkip: CODEBLOCK - Codeblock to execute on skip operations (optional).

aCols: ARRAY - Array of column specifications (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetTree( myTreeObject, "tree_bmp_resource" ) // Sets Tree object as data source.
content_copy
download
Use code with caution.
Harbour

25. SetColsForTree( uData )

Description: Sets columns for a tree browse based on data type.

Parameters:

uData: - Data type indicator for tree browse columns.

Return Value: None

Usage Example: (Internal use, called within SetTree)

26. InvertPivot()

Description: Inverts the pivot of the browse control (rotates data 90 degrees).

Parameters: None

Return Value: None

Usage Example:

oBrw:InvertPivot()
content_copy
download
Use code with caution.
Harbour

27. ArrCalcWidths( aData, aCols, nMaxRows )

Description: Calculates column widths based on array data and column specifications.

Parameters:

aData: ARRAY - Data array.

aCols: ARRAY - Column specifications array.

nMaxRows: NUMERIC - Maximum number of rows to consider for width calculation.

Return Value: ARRAY - Array containing calculated column widths.

Usage Example: (Internal use, called within AutoFit)

28. GetColsData( cData, lByCreationOrder )

Description: Retrieves column data as an array of values for a specified column DATA member.

Parameters:

cData: CHARACTER - Name of the column DATA member to retrieve (e.g., "cHeader", "nWidth").

lByCreationOrder: LOGICAL - .T. to return data in creation order, .F. in display order.

Return Value: ARRAY - Array of values for the specified column DATA member.

Usage Example:

aColumnHeaders := oBrw:GetColsData( "cHeader" ) // Gets all column headers.
aColumnWidths := oBrw:GetColsData( "nWidth", .T. ) // Gets column widths in creation order.
content_copy
download
Use code with caution.
Harbour

29. SetColsData( cData, aValues, lByCreationOrder )

Description: Sets column data based on an array of values for a specified column DATA member.

Parameters:

cData: CHARACTER - Name of the column DATA member to set (e.g., "cHeader", "nWidth").

aValues: ARRAY - Array of values to set for the column DATA member.

lByCreationOrder: LOGICAL - .T. to set data in creation order, .F. in display order.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetColsData( "cHeader", myColumnHeaders ) // Sets column headers.
oBrw:SetColsData( "nWidth", myWidthValues, .T. ) // Sets column widths in creation order.
content_copy
download
Use code with caution.
Harbour

30. SetGroupHeader( cGrpHdr, nFrom, nUpto, oFont, nAlign, nHeight )

Description: Sets a group header for a range of columns.

Parameters:

cGrpHdr: CHARACTER - Group header text.

nFrom: NUMERIC - Starting column index for the group.

nUpto: NUMERIC - Ending column index for the group.

oFont: OBJECT - Font object for the group header (optional).

nAlign: NUMERIC - Alignment for the group header text (AL_LEFT, AL_CENTER, AL_RIGHT).

nHeight: NUMERIC - Height of the group header (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetGroupHeader( "Customer Information", 1, 3, myHeaderFont, AL_CENTER, 30 ) // Sets group header for columns 1-3.
content_copy
download
Use code with caution.
Harbour

31. SetGroupTotal( aCols, cHead, nType, oFont )

Description: Sets a group total row for specified columns.

Parameters:

aCols: ARRAY - Array of column indices to calculate totals for.

cHead: CHARACTER - Header text for the group total row.

nType: NUMERIC - Aggregation type (AGGR_SUM, AGGR_AVG, AGGR_MIN, AGGR_MAX, AGGR_COUNT, AGGR_STD, AGGR_STDEVP).

oFont: OBJECT - Font object for the group total row (optional).

Return Value: None

Usage Example:

oBrw:SetGroupTotal( { 4, 5 }, "Total Sales", AGGR_SUM, myTotalFont ) // Sets group total row for columns 4 and 5 with sum aggregation.
content_copy
download
Use code with caution.
Harbour

32. ResetBrowse()

Description: Resets the browse control to its initial state, clearing data, columns, and settings.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ResetBrowse()
content_copy
download
Use code with caution.
Harbour

33. SetColFromADO( cnCol, lAutoOrder, aRsColNames, l1900, cAdoDB )

Description: Sets column properties from an ADO field object.

Parameters:

cnCol: - Column identifier (field name or index).

lAutoOrder: LOGICAL - .T. to enable auto-ordering, .F. otherwise.

aRsColNames: ARRAY - Array of ADO column names (optional).

l1900: LOGICAL - Flag for 1900 date handling (optional).

cAdoDB: CHARACTER - ADO database connection string (optional).

Return Value: OBJECT - Returns the TxBrwColumn object.

Usage Example: (Internal use, called within SetADO)

34. ArrCell( nRow, nCol, cPic, lDispZeros )

Description: Retrieves the content of a specific cell in array data source.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

cPic: CHARACTER - Picture format string (optional).

lDispZeros: LOGICAL - .T. to display zeros, .F. otherwise (optional).

Return Value: - Content of the cell (data type depends on array data).

Usage Example:

cellValue := oBrw:ArrCell( 2, 3 ) // Gets value from row 2, column 3.
content_copy
download
Use code with caution.
Harbour

35. ArrCellSet( nRow, nCol, uNewVal, lTrim )

Description: Sets the content of a specific cell in array data source.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

uNewVal: - New value to set for the cell.

lTrim: LOGICAL - .T. to trim string values, .F. otherwise.

Return Value: - Content of the cell after setting the new value.

Usage Example:

oBrw:ArrCellSet( 3, 1, "New Value" ) // Sets value in row 3, column 1.
content_copy
download
Use code with caution.
Harbour

36. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a temporary message box within the browse control.

Parameters:

cMsg: CHARACTER - Message text to display.

nSecs: NUMERIC - Duration to display the message in seconds (0 for indefinite).

nClrText: - Text color for the message (optional).

nClrBack: - Background color for the message (optional).

Return Value: None

Usage Example:

oBrw:ShowMessage( "Processing data...", 5 ) // Shows message for 5 seconds.
content_copy
download
Use code with caution.
Harbour

37. CloseMessage()

Description: Closes the message box displayed by ShowMessage().

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage()
content_copy
download
Use code with caution.
Harbour

38. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the browse cursor position to a specific cell.

Parameters:

nRow: NUMERIC - Row index (1-based).

nCol: NUMERIC - Column index (1-based).

lPixel: LOGICAL - .T. if row/col are pixel coordinates, .F. if row/col are row/column indices.

bAction: CODEBLOCK - Codeblock to execute after repositioning (optional).

Return Value: None

Usage Example:

oBrw:SetPos( 10, 2 ) // Sets cursor to row 10, column 2.
oBrw:SetPos( 50, 100, .T. ) // Sets cursor position by pixel coordinates.
content_copy
download
Use code with caution.
Harbour

39. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance of the browse control.

Parameters:

uBack: - Background color or bitmap resource.

uBckMode: - Background mode (gradient style or bitmap tiling, optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( CLR_WHITE ) // Sets white background color.
oBrw:SetBackGround( "background.bmp", 1 ) // Sets background bitmap with vertical gradient.
content_copy
download
Use code with caution.
Harbour

40. MakeBrush()

Description: Creates a brush object for painting the background (internal method).

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only)

41. DataRect()

Description: Returns a TRect object representing the data area of the browse (internal method).

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only)

42. cBmpAdjBrush( cFile )

Description: Sets or gets the bitmap brush for background adjustment, creating one if needed.

Parameters:

cFile: CHARACTER - Path to a bitmap file (optional, for SET mode).

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example:

oBrw:cBmpAdjBrush( "my_background_brush.bmp" ) // Sets a bitmap brush from file.
hBrush := oBrw:cBmpAdjBrush() // Gets the current bitmap brush.
content_copy
download
Use code with caution.
Harbour

43. ColStretch( nStretchCol )

Description: Stretches a column to fill available space in the browse control.

Parameters:

nStretchCol: NUMERIC - Column index to stretch (optional, if not provided, stretches last column).

Return Value: None

Usage Example:

oBrw:ColStretch( 2 ) // Stretches the 2nd column.
oBrw:ColStretch() // Stretches the last column.
content_copy
download
Use code with caution.
Harbour

44. DestroyToolTip()

Description: Destroys the tooltip control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

45. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).

Parameters:

nHitTestCode: NUMERIC - Hit test code.

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: None

Usage Example: (Internal use only)

46. MouseLeave( nRow, nCol, nFlags )

Description: Handles mouse leave event (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Mouse event flags.

Return Value: None

Usage Example: (Internal use only)

47. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message (non-client mouse move, internal method).

Parameters:

nHitTestCode: NUMERIC - Hit test code.

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: None

Usage Example: (Internal use only)

48. MouseLeave( nRow, nCol, nFlags )

Description: Handles mouse leave event (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Mouse event flags.

Return Value: None

Usage Example: (Internal use only)

49. uDataSource()

Description: Accessor for the data source object (ODBF, ADO, MySQL, or Array) (internal method).

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only)

50. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates or edits a data row object (TXBrwRow).

Parameters:

lNew: LOGICAL - .T. to create a new row, .F. to edit current row.

cFieldList: CHARACTER - Comma-separated string of field names (optional).

lSourceData: LOGICAL - .T. if using source data, .F. otherwise (optional).

aInitVals: ARRAY - Array of initial values for new row (optional).

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example:

oNewRow := oBrw:DataRow( .T. ) // Creates a new data row object.
oEditRow := oBrw:DataRow( .F. ) // Edits the current data row.
content_copy
download
Use code with caution.
Harbour

51. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits the data source (RDD, Array) in a modal dialog.

Parameters:

lNew: LOGICAL - .T. for new record, .F. for edit current record.

cFieldList: CHARACTER - Field list to edit (optional).

lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.

aInitVals: ARRAY - Array of initial values for new record (optional).

bSetup: CODEBLOCK - Codeblock to customize the edit dialog (optional).

Return Value: OBJECT - Returns the edited TXBrowse object (Self).

Usage Example:

oBrw:EditSource( .F., "FIELD1, FIELD2" ) // Edits current record in a dialog, displaying only FIELD1 and FIELD2.
content_copy
download
Use code with caution.
Harbour

52. EditBrowse( lNew, cFieldList, lNavigate )

Description: Edits the data source (RDD, Array) in a browse-like modal dialog.

Parameters:

lNew: LOGICAL - .T. for new record, .F. for edit current record.

cFieldList: CHARACTER - Field list to edit (optional).

lNavigate: LOGICAL - .T. to enable navigation buttons in dialog, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:EditBrowse( .T. ) // Opens a browse-like dialog to add a new record.
content_copy
download
Use code with caution.
Harbour

53. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )

Description: General method for editing data in a modal dialog, automatically choosing between EditSource and EditBrowse based on lSourceData flag.

Parameters: (Same as EditSource and EditBrowse)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)

54. Delete( lMsg )

Description: Deletes the current record from the data source.

Parameters:

lMsg: LOGICAL - .T. to display a confirmation message, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Delete( .T. ) // Deletes current record with confirmation message.
content_copy
download
Use code with caution.
Harbour

55. SetOrderNatural()

Description: Sets the browse order to natural order (no sorting).

Parameters: None

Return Value: None

Usage Example:

oBrw:SetOrderNatural()
content_copy
download
Use code with caution.
Harbour

56. SetChecks( aBmp, lEdit, aPrompt )

Description: Enables checkboxes in a column for logical data type.

Parameters:

aBmp: ARRAY - Array of bitmaps for checkbox states (optional).

lEdit: LOGICAL - .T. to enable editing checkboxes, .F. otherwise.

aPrompt: CHARACTER - Prompt text for checkboxes (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetChecks( , .T. ) // Enables editable checkboxes in the first column (if logical).
content_copy
download
Use code with caution.
Harbour

57. SetMultiSelectCol( uCol, lFooter )

Description: Sets a column as the multi-select column, enabling row selection using checkboxes.

Parameters:

uCol: OBJECT or NUMERIC - TxBrwColumn object or column index for multi-select column.

lFooter: LOGICAL - .T. to show selected row count in footer, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column a multi-select column, showing selected count in footer.
content_copy
download
Use code with caution.
Harbour

58. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )

Description: Safely evaluates a codeblock, returning a default value if an error occurs (internal method).

Parameters:

RetVal_ifFailed: - Value to return if codeblock evaluation fails.

bBlock: CODEBLOCK - Codeblock to evaluate.

params_for_bBlock: - Optional parameters to pass to the codeblock.

Return Value: - Result of codeblock evaluation or RetVal_ifFailed if error.

Usage Example: (Internal use only)

59. AddVar( uKey, uVal )

Description: Adds a variable to the hCargo hash table for storing custom data associated with the browse control.

Parameters:

uKey: - Key for the variable in the hCargo hash.

uVal: - Value to store for the variable.

Return Value: None

Usage Example:

oBrw:AddVar( "MyCustomSetting", "Some Value" ) // Adds a custom setting to the browse.
content_copy
download
Use code with caution.
Harbour

60. lPasteReady()

Description: Checks if clipboard content is in a paste-ready format (internal method).

Parameters: None

Return Value: LOGICAL - .T. if paste-ready, .F. otherwise.

Usage Example: (Internal use only)

61. OnError()

Description: Default error handler for the TXBrowse class (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

62. SetColumns( nRow, nCol, nFlags, oColumn )

Description: Sets properties of a specific column (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Flags.

oColumn: OBJECT - TxBrwColumn object.

Return Value: None

Usage Example: (Internal use only)

63. GoNextCtrl( hWnd )

Description: Moves focus to the next control in the window (internal method).

Parameters:

hWnd: - Handle to the current control window.

Return Value: None

Usage Example: (Internal use only)

64. GoPrevCtrl()

Description: Moves focus to the previous control in the window (virtual method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, Virtual method for overriding)

65. SelFont()

Description: Selects the current font for the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

66. SetFont( oFont, lResizeCols )

Description: Sets the font for the browse control.

Parameters:

oFont: OBJECT - Font object to set.

lResizeCols: LOGICAL - .T. to resize columns to fit new font, .F. otherwise.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetFont( myFontObject ) // Sets a new font for the browse.
oBrw:SetFont( myFontObject, .T. ) // Sets new font and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour

67. FontSize( nPlus )

Description: Adjusts the font size by a specified increment.

Parameters:

nPlus: NUMERIC - Font size increment (positive to increase, negative to decrease).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:FontSize( 2 ) // Increases font size by 2 points.
oBrw:FontSize( -1 ) // Decreases font size by 1 point.
content_copy
download
Use code with caution.
Harbour

68. ReCalcWH()

Description: Recalculates width and height of browse elements based on current settings (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

69. DrawSelect()

Description: Draws the selection indicator line (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

70. RefreshCurrent()

Description: Refreshes the currently selected row (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

71. oRow()

Description: Accessor for the current row data in array data source (internal method).

Parameters: None

Return Value: - Returns the current row data as an array element.

Usage Example: (Internal use only)

72. oCol( u )

Description: Retrieves a TxBrwColumn object by its index or object reference.

Parameters:

u: NUMERIC or OBJECT - Column index (1-based) or TxBrwColumn object.

Return Value: OBJECT - Returns the TxBrwColumn object or NIL if not found.

Usage Example:

oColumn := oBrw:oCol( 2 ) // Gets the TxBrwColumn object for the 2nd column.
content_copy
download
Use code with caution.
Harbour

73. RefreshHeaders()

Description: Refreshes the header area of the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

74. RefreshFooters()

Description: Refreshes the footer area of the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

75. ClpRow( lFullRow, aCols, lFormatted )

Description: Copies a row to the clipboard in text format.

Parameters:

lFullRow: LOGICAL - .T. to copy the entire row, .F. to copy only selected columns.

aCols: ARRAY - Array of column indices to copy (if lFullRow is .F., optional).

lFormatted: LOGICAL - .T. to format data for MSWord export, .F. otherwise.

Return Value: CHARACTER - String containing the row data in text format.

Usage Example:

cRowText := oBrw:ClpRow( .T. ) // Copies the entire current row to clipboard.
content_copy
download
Use code with caution.
Harbour

76. Copy( laRows, aCols )

Description: Copies rows to the clipboard.

Parameters:

laRows: LOGICAL or ARRAY - .T. to copy all rows, FALSE to copy current row, or ARRAY of row indices to copy.

aCols: ARRAY - Array of column indices to copy (optional).

Return Value: None

Usage Example:

oBrw:Copy( .T. ) // Copies all rows to clipboard.
oBrw:Copy( .F. ) // Copies current row to clipboard.
oBrw:Copy( { 1, 3, 5 } ) // Copies rows 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour

77. Paste( cText )

Description: Pastes text from the clipboard into the browse control.

Parameters:

cText: CHARACTER - Text to paste (optional, if not provided, reads from clipboard).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Paste() // Pastes from clipboard to current cell.
oBrw:Paste( "Some Text to Paste" ) // Pastes provided text to current cell.
content_copy
download
Use code with caution.
Harbour

78. aCellCoor( nRow, nCol )

Description: Returns coordinates of a cell in pixels (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: ARRAY - Array containing cell coordinates {nTop, nLeft, nBottom, nRight}.

Usage Example: (Internal use only)

79. CellBitmap( nRow, nCol )

Description: Creates a bitmap of a cell (internal method).

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

Return Value: OBJECT - Returns the bitmap handle.

Usage Example: (Internal use only)

80. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a message in the browse control (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ShowMessage)

Return Value: None

Usage Example:

oBrw:ShowMessage( { || "Loading Data..." }, 0 ) // Shows message using a codeblock.
content_copy
download
Use code with caution.
Harbour

81. CloseMessage()

Description: Closes the message box (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage( { || .t. } ) // Closes message using a codeblock.
content_copy
download
Use code with caution.
Harbour

82. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the cursor position (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member SetPos)

Return Value: None

Usage Example:

oBrw:SetPos( 1, 1, .F., { || MsgInfo( "Cursor repositioned" ) } ) // Repositions cursor and executes codeblock.
content_copy
download
Use code with caution.
Harbour

83. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member SetBackGround)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( CLR_BLUE, 2 ) // Sets blue background with gradient using a codeblock.
content_copy
download
Use code with caution.
Harbour

84. MakeBrush()

Description: Creates a brush (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only - method version for codeblock usage)

85. DataRect()

Description: Returns DataRect (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only - method version for codeblock usage)

86. cBmpAdjBrush( cFile )

Description: Sets or gets bitmap brush (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member cBmpAdjBrush)

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

87. ColStretch( nStretchCol )

Description: Stretches column (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ColStretch)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

88. DestroyToolTip()

Description: Destroys tooltip (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

89. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member NcMouseMove)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

90. MouseLeave( nRow, nCol, nFlags )

Description: Handles MouseLeave (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member MouseLeave)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

91. uDataSource()

Description: Accessor for DataSource (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only - method version for codeblock usage)

92. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates DataRow (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member DataRow)

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

93. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits Source (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member EditSource)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

94. EditBrowse( lNew, cFieldList, lNavigate )

Description: Ed
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

Code: Select all | Expand

95. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup ) (Continued)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Used internally, calls either EditSource or EditBrowse based on parameters)

96. Delete( lMsg )

Description: Deletes the current record from the data source.

Parameters:

lMsg: LOGICAL - .T. to display a confirmation message box before deletion, .F. for silent deletion.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Delete( .T. ) // Deletes the current record with a confirmation prompt.
oBrw:Delete( .F. ) // Deletes the current record without confirmation.
content_copy
download
Use code with caution.
Harbour

97. SetOrderNatural()

Description: Resets the sorting order of the browse to its natural (unsorted) order.

Parameters: None

Return Value: None

Usage Example:

oBrw:SetOrderNatural() // Removes any sorting applied to the browse.
content_copy
download
Use code with caution.
Harbour

98. SetChecks( aBmp, lEdit, aPrompt )

Description: Enables checkboxes for the first column of the browse, typically used for selecting rows.

Parameters:

aBmp: ARRAY - Optional array containing bitmap handles for the checkbox states (checked, unchecked, null). If not provided, default bitmaps are used.

lEdit: LOGICAL - .T. to allow users to edit the checkbox state directly in the browse, .F. for read-only checkboxes.

aPrompt: CHARACTER - Optional prompt text associated with the checkboxes.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetChecks( , .T. ) // Adds editable checkboxes to the first column.
oBrw:SetChecks( { hBmpChecked, hBmpUnchecked }, .F., "Select Rows" ) // Adds read-only checkboxes with custom bitmaps and prompt.
content_copy
download
Use code with caution.
Harbour

99. SetMultiSelectCol( uCol, lFooter )

Description: Designates a specific column to function as a multi-select column, enabling row selection using checkboxes in that column.

Parameters:

uCol: OBJECT or NUMERIC - TxBrwColumn object or column index (number) to designate as the multi-select column.

lFooter: LOGICAL - .T. to display the count of selected rows in the footer, .F. to hide the count.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetMultiSelectCol( 1, .T. ) // Makes the first column the multi-select column, displaying selected count in the footer.
oBrw:SetMultiSelectCol( oBrw:oCol( "MyColumn" ), .F. ) // Makes "MyColumn" the multi-select column, hiding footer count.
content_copy
download
Use code with caution.
Harbour

100. SafeEval( RetVal_ifFailed, bBlock, params_for_bBlock, ... )

Description: Provides a safe way to evaluate a codeblock, trapping potential runtime errors and returning a default value if an error occurs. This is useful for preventing browse errors from crashing the application.

Parameters:

RetVal_ifFailed: - The value to be returned if the evaluation of bBlock results in an error.

bBlock: CODEBLOCK - The codeblock to be evaluated.

params_for_bBlock: - Optional parameters to be passed to the codeblock during evaluation.

Return Value: - The result of the codeblock evaluation if successful, or RetVal_ifFailed if an error occurs.

Usage Example: (Primarily for internal use, but can be used in custom codeblocks within TXBrowse)

nValue := oBrw:SafeEval( 0, { || Val( oBrw:ArrCell( 1, 1 ) ) } ) // Safely evaluates Val() on a cell, returns 0 if Val() fails.
content_copy
download
Use code with caution.
Harbour

101. AddVar( uKey, uVal )

Description: Allows adding custom variables to the hCargo hash table associated with the TXBrowse object. This provides a mechanism to store and retrieve custom data related to the browse.

Parameters:

uKey: - The key (identifier) for the variable within the hCargo hash table.

uVal: - The value to be stored for the variable.

Return Value: None

Usage Example:

oBrw:AddVar( "UserPreference", "Dark Mode" ) // Stores a user preference setting in hCargo.
customSetting := oBrw:hCargo[ "UserPreference" ] // Retrieves the custom setting.
content_copy
download
Use code with caution.
Harbour

102. lPasteReady()

Description: Checks if the data currently in the clipboard is in a format suitable for pasting into the TXBrowse control.

Parameters: None

Return Value: LOGICAL - Returns .T. if the clipboard data is paste-ready, .F. otherwise.

Usage Example: (Primarily used internally to determine if pasting functionality should be enabled)

103. OnError()

Description: Default error handler method for the TXBrowse class. This method is called when an error occurs within the browse control.

Parameters: None

Return Value: None

Usage Example: (Primarily for internal use; you can override this method to implement custom error handling)

104. SetColumns( nRow, nCol, nFlags, oColumn )

Description: Used internally to set properties of a specific column at a given row and column position, likely during column resizing or layout adjustments.

Parameters:

nRow: NUMERIC - Row index.

nCol: NUMERIC - Column index.

nFlags: NUMERIC - Flags.

oColumn: OBJECT - TxBrwColumn object.

Return Value: None

Usage Example: (Internal use only)

105. GoNextCtrl( hWnd )

Description: Moves the input focus to the next control within the same window as the TXBrowse control. This is often used for navigation between controls in a form or dialog.

Parameters:

hWnd: - Handle of the current control that has focus.

Return Value: None

Usage Example: (Used internally for control navigation)

106. GoPrevCtrl()

Description: Moves the input focus to the previous control in the window. This is a VIRTUAL method, meaning it's designed to be overridden in derived classes to customize the behavior of moving to the previous control.

Parameters: None

Return Value: None

Usage Example: (Virtual method, override in derived classes for custom behavior)

107. SelFont()

Description: Selects and retrieves the currently active font for the TXBrowse control.

Parameters: None

Return Value: None

Usage Example: (Internal use only, likely related to font handling within the control)

108. SetFont( oFont, lResizeCols )

Description: Sets the font to be used for displaying data within the TXBrowse control.

Parameters:

oFont: OBJECT - The TFont object representing the font to be applied.

lResizeCols: LOGICAL - .T. to automatically adjust column widths to fit the new font, .F. to keep column widths unchanged.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetFont( myFont, .T. ) // Applies 'myFont' and resizes columns to fit.
content_copy
download
Use code with caution.
Harbour

109. FontSize( nPlus )

Description: Dynamically adjusts the font size of the browse control, either increasing or decreasing it.

Parameters:

nPlus: NUMERIC - A positive value to increase the font size, or a negative value to decrease it.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:FontSize( 1 ) // Increases the font size by 1 point.
oBrw:FontSize( -2 ) // Decreases the font size by 2 points.
content_copy
download
Use code with caution.
Harbour

110. ReCalcWH()

Description: Recalculates the widths and heights of various elements within the TXBrowse control, such as headers, footers, and rows, based on the current font and other style settings. This is typically called internally after changes that might affect layout.

Parameters: None

Return Value: None

Usage Example: (Internal use only, called automatically when layout changes occur)

111. DrawSelect()

Description: Draws the visual indicator for the currently selected row (the record selector).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called during painting to visually highlight the selected row)

112. RefreshCurrent()

Description: Refreshes the display of the currently selected row in the browse control. This is useful to update the display after data changes.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshCurrent() // Updates the display of the current row.
content_copy
download
Use code with caution.
Harbour

113. aRow()

Description: Accessor method to retrieve the data for the currently selected row when using an array as the data source.

Parameters: None

Return Value: - Returns the data for the current row as an array element.

Usage Example:

currentRowData := oBrw:aRow // Retrieves data of the current row in array browse.
content_copy
download
Use code with caution.
Harbour

114. oCol( u )

Description: Retrieves a TxBrwColumn object associated with the TXBrowse control.

Parameters:

u: NUMERIC or OBJECT - Column index (1-based) or a direct reference to a TxBrwColumn object.

Return Value: OBJECT - Returns the TxBrwColumn object if found, otherwise returns NIL.

Usage Example:

oFirstColumn := oBrw:oCol( 1 ) // Retrieves the TxBrwColumn object for the first column.
content_copy
download
Use code with caution.
Harbour

115. RefreshHeaders()

Description: Refreshes the visual display of the header area of the TXBrowse control.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshHeaders() // Redraws the header area to reflect changes.
content_copy
download
Use code with caution.
Harbour

116. RefreshFooters()

Description: Refreshes the visual display of the footer area of the TXBrowse control.

Parameters: None

Return Value: None

Usage Example:

oBrw:RefreshFooters() // Redraws the footer area to reflect changes, like updated totals.
content_copy
download
Use code with caution.
Harbour

117. ClpRow( lFullRow, aCols, lFormatted )

Description: Copies the data of a row to the clipboard, formatting it as text.

Parameters:

lFullRow: LOGICAL - .T. to copy all columns of the row, .F. to copy only specified columns.

aCols: ARRAY - (Optional) Array of column indices to copy if lFullRow is .F..

lFormatted: LOGICAL - .T. to format the text output for better compatibility with MS Word, .F. for plain text.

Return Value: CHARACTER - Returns a character string containing the formatted row data for the clipboard.

Usage Example:

clipboardText := oBrw:ClpRow( .T. ) // Copies the entire current row to the clipboard as formatted text.
content_copy
download
Use code with caution.
Harbour

118. Copy( laRows, aCols )

Description: Copies one or more rows from the browse to the clipboard.

Parameters:

laRows: LOGICAL or ARRAY - Specifies which rows to copy:

.T. : Copy all rows in the browse.

.F. : Copy only the currently selected row.

ARRAY : Copy rows at the specified indices in the array.

aCols: ARRAY - (Optional) Array of column indices to copy for the specified rows.

Return Value: None

Usage Example:

oBrw:Copy( .F. ) // Copies the currently selected row.
oBrw:Copy( .T., { 1, 3, 5 } ) // Copies all rows but only columns 1, 3, and 5.
content_copy
download
Use code with caution.
Harbour

119. Paste( cText )

Description: Pastes data from the clipboard into the browse control, starting at the currently selected cell.

Parameters:

cText: CHARACTER - (Optional) Text string to paste. If omitted, the method reads data from the clipboard.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Paste() // Pastes clipboard data into the browse.
oBrw:Paste( "Data to paste" ) // Pastes the provided text directly.
content_copy
download
Use code with caution.
Harbour

120. aCellCoor( nRow, nCol )

Description: Retrieves the screen coordinates (top, left, bottom, right) of a specific cell within the browse control.

Parameters:

nRow: NUMERIC - Row index of the cell.

nCol: NUMERIC - Column index of the cell.

Return Value: ARRAY - Returns an array containing the coordinates: { nTop, nLeft, nBottom, nRight } in pixels.

Usage Example:

cellCoords := oBrw:aCellCoor( 5, 2 ) // Gets coordinates of the cell at row 5, column 2.
content_copy
download
Use code with caution.
Harbour

121. CellBitmap( nRow, nCol )

Description: Creates a bitmap image of a specific cell within the browse control.

Parameters:

nRow: NUMERIC - Row index of the cell.

nCol: NUMERIC - Column index of the cell.

Return Value: OBJECT - Returns a bitmap handle (HBITMAP) of the cell's content.

Usage Example:

hCellBitmap := oBrw:CellBitmap( 1, 1 ) // Creates a bitmap of the cell at row 1, column 1.
content_copy
download
Use code with caution.
Harbour

122. ShowMessage( cMsg, nSecs, nClrText, nClrBack )

Description: Displays a message overlay within the TXBrowse control. This is a method version of the ShowMessage DATA member, allowing for codeblock parameters.

Parameters: (Same as for the ShowMessage DATA member)

Return Value: None

Usage Example:

oBrw:ShowMessage( { || "Loading data..." }, 0 ) // Displays a message using a codeblock for the message text.
content_copy
download
Use code with caution.
Harbour

123. CloseMessage()

Description: Closes any message box currently displayed by ShowMessage.

Parameters: None

Return Value: None

Usage Example:

oBrw:CloseMessage() // Closes the message box.
content_copy
download
Use code with caution.
Harbour

124. SetPos( nRow, nCol, lPixel, bAction )

Description: Sets the cursor position within the browse. This is a method version of the SetPos DATA member, allowing for a codeblock to be executed after repositioning.

Parameters: (Same as for the SetPos DATA member)

Return Value: None

Usage Example:

oBrw:SetPos( 1, 2, .F., { || MsgInfo( "Cursor moved" ) } ) // Repositions the cursor and executes a codeblock.
content_copy
download
Use code with caution.
Harbour

125. SetBackGround( uBack, uBckMode )

Description: Sets the background appearance of the browse control. This is a method version of the SetBackGround DATA member, allowing for codeblock parameters.

Parameters: (Same as for the SetBackGround DATA member)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:SetBackGround( { || CLR_BLUE }, 2 ) // Sets background using a codeblock for the color and gradient mode.
content_copy
download
Use code with caution.
Harbour

126. MakeBrush()

Description: Creates a brush object for painting the browse background. Method version for use within codeblocks.

Parameters: None

Return Value: OBJECT - Returns the created brush object.

Usage Example: (Internal use only, method version for codeblock use)

127. DataRect()

Description: Returns a TRect object representing the data display area of the browse. Method version for use within codeblocks.

Parameters: None

Return Value: OBJECT - Returns a TRect object.

Usage Example: (Internal use only - method version for codeblock usage)

128. cBmpAdjBrush( cFile )

Description: Sets or gets the bitmap brush for background adjustment. Method version for use within codeblocks.

Parameters: (Same as DATA member cBmpAdjBrush)

Return Value: - In GET mode, returns the bitmap brush object. In SET mode, returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

129. ColStretch( nStretchCol )

Description: Stretches a column to fill available space. Method version for use within codeblocks.

Parameters: (Same as DATA member ColStretch)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

130. DestroyToolTip()

Description: Destroys the tooltip control. Method version for use within codeblocks.

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

131. NcMouseMove( nHitTestCode, nRow, nCol )

Description: Handles WM_NCMOUSEMOVE message. Method version for use within codeblocks.

Parameters: (Same as DATA member NcMouseMove)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

132. MouseLeave( nRow, nCol, nFlags )

Description: Handles MouseLeave event. Method version for use within codeblocks.

Parameters: (Same as DATA member MouseLeave)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

133. uDataSource()

Description: Accessor for DataSource. Method version for use within codeblocks.

Parameters: None

Return Value: - Returns the data source object.

Usage Example: (Internal use only - method version for codeblock usage)

134. DataRow( lNew, cFieldList, lSourceData, aInitVals )

Description: Creates DataRow. Method version for use within codeblocks.

Parameters: (Same as DATA member DataRow)

Return Value: OBJECT - Returns the created or edited TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

135. EditSource( lNew, cFieldList, lNavigate, aInitVals, bSetup )

Description: Edits Source. Method version for use within codeblocks.

Parameters: (Same as DATA member EditSource)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

136. EditBrowse( lNew, cFieldList, lNavigate )

Description: Edits Browse. Method version for use within codeblocks.

Parameters: (Same as DATA member EditBrowse)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

137. Edit( lNew, cFieldList, lSourceData, lNavigate, aInitVals, bSetup )

Description: Edits data (general edit method). Method version for use within codeblocks.

Parameters: (Same as DATA member Edit)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

138. Delete( lMsg )

Description: Deletes a record. Method version for use within codeblocks.

Parameters: (Same as DATA member Delete)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

139. GoFltRow( n )

Description: Navigates to a specific row within a filtered browse based on its filter row index.

Parameters:

n: NUMERIC - The filter row index to navigate to (1-based).

Return Value: LOGICAL - Returns .T. if navigation was successful, .F. otherwise.

Usage Example:

oBrw:GoFltRow( 3 ) // Moves the browse cursor to the 3rd row in the filtered dataset.
content_copy
download
Use code with caution.
Harbour

140. GoFltRow( n ) (Second Definition)

Description: Retrieves the filter row index if no parameters are passed.

Parameters:

n: NUMERIC - (Optional) If NIL it returns the current filter row index, otherwise it sets the filter row index.

Return Value: NUMERIC - Returns the current filter row index.

Usage Example:

nCurrentFilterRow := oBrw:GoFltRow() // Gets the current filter row index.
content_copy
download
Use code with caution.
Harbour

141. SaveState( aAdditionalData )

Description: Saves the current state of the browse control, allowing for later restoration.

Parameters:

aAdditionalData: ARRAY - (Optional) Array for saving additional custom data with the browse state.

Return Value: None

Usage Example:

oBrw:SaveState() // Saves the current browse state.
oBrw:SaveState( { "CustomData1", "CustomData2" } ) // Saves state with additional data.
content_copy
download
Use code with caution.
Harbour

142. RestoreState( cState )

Description: Restores the browse control to a previously saved state, using a state string obtained from SaveState().

Parameters:

cState: CHARACTER - State string obtained from SaveState().

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:RestoreState( savedStateString ) // Restores browse state from the saved string.
content_copy
download
Use code with caution.
Harbour

143. OldRestoreState( cState )

Description: Retained for compatibility with older versions (10.8) of the TXBrowse class. Restores browse state from a state string.

Parameters:

cState: CHARACTER - State string in the older format.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (For backward compatibility with older saved states)

144. Lock()

Description: Locks the browse control, preventing data modifications.

Parameters: None

Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.

Usage Example:

lLocked := oBrw:Lock()
content_copy
download
Use code with caution.
Harbour

145. UnLock()

Description: Unlocks the browse control, allowing data modifications.

Parameters: None

Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).

Usage Example:

oBrw:UnLock()
content_copy
download
Use code with caution.
Harbour

146. SaveData( lRefresh )

Description: Saves any pending data changes to the underlying data source.

Parameters:

lRefresh: LOGICAL - .T. to refresh the browse after saving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.

Usage Example:

lSaved := oBrw:SaveData( .T. ) // Saves data changes and refreshes the browse.
content_copy
download
Use code with caution.
Harbour

147. ShowSeek()

Description: Shows or hides the incremental seek input control (TGet object).

Parameters: None

Return Value: None

Usage Example:

oBrw:ShowSeek() // Shows the incremental seek input control.
content_copy
download
Use code with caution.
Harbour

148. Seek( cSeek )

Description: Performs an incremental seek operation based on the provided search string.

Parameters:

cSeek: CHARACTER - String to search for incrementally.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:Seek( "customer name" ) // Performs incremental seek for "customer name".
content_copy
download
Use code with caution.
Harbour

149. RddIncrSeek( cExpr, uSeek )

Description: Performs incremental seek on an RDD data source using a custom expression.

Parameters:

cExpr: CHARACTER - Expression to evaluate for each record during the seek.

uSeek: - Search string to match against the expression result.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example: (Advanced usage for custom incremental seek logic)

150. RddIncrFilter( cExpr, uSeek )

Description: Performs incremental filtering on an RDD data source using a custom expression.

Parameters:

cExpr: CHARACTER - Expression to evaluate for filtering.

uSeek: - Search string for filtering criteria.

Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.

Usage Example: (Advanced usage for custom incremental filtering logic)

151. ArrayIncrSeek( cSeek, nGoTo )

Description: Performs incremental seek on an array data source.

Parameters:

cSeek: CHARACTER - String to search for incrementally.

nGoTo: NUMERIC - Row index to go to if a match is found (optional).

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:ArrayIncrSeek( "item description" ) // Incremental seek in array data.
content_copy
download
Use code with caution.
Harbour

152. ArrayIncrFilter( cSeek, nGoTo )

Description: Performs incremental filtering on an array data source.

Parameters:

cSeek: CHARACTER - String to filter by.

nGoTo: NUMERIC - Row index to navigate to after filtering (optional).

Return Value: LOGICAL - Returns .T. if filter is applied successfully, .F. otherwise.

Usage Example:

oBrw:ArrayIncrFilter( "status: pending" ) // Incremental filter on array data.
content_copy
download
Use code with caution.
Harbour

153. AdoIncrSeek( uSeek )

Description: Performs incremental seek on an ADO recordset data source.

Parameters:

uSeek: - String to search for incrementally.

Return Value: LOGICAL - Returns .T. if a match is found, .F. otherwise.

Usage Example:

lFound := oBrw:AdoIncrSeek( "product name" ) // Incremental seek in ADO recordset.
content_copy
download
Use code with caution.
Harbour

154. Select( nOperation )

Description: Selects or deselects rows in multi-select mode based on different operations.

Parameters:

nOperation: NUMERIC - Operation code:

0: Deselect all rows.

1: Add current row to selection.

2: Swap current row selection (toggle).

3: Select a range of rows (Shift+click).

4: Select all rows.

Return Value: None

Usage Example:

oBrw:Select( 1 ) // Adds the current row to the selection.
oBrw:Select( 0 ) // Deselects all rows.
content_copy
download
Use code with caution.
Harbour

155. SelectAll()

Description: Selects all rows in the browse control (shortcut for Select(4)).

Parameters: None

Return Value: None

Usage Example:

oBrw:SelectAll() // Selects all rows in the browse.
content_copy
download
Use code with caution.
Harbour

156. SelectNone()

Description: Deselects all rows in the browse control (shortcut for Select(0)).

Parameters: None

Return Value: None

Usage Example:

oBrw:SelectNone() // Deselects all rows.
content_copy
download
Use code with caution.
Harbour

157. IsSelectedRow()

Description: Checks if the current row is selected in multi-select mode.

Parameters: None

Return Value: LOGICAL - .T. if the current row is selected, .F. otherwise.

Usage Example:

if oBrw:IsSelectedRow()
    MsgInfo( "Current row is selected." )
endif
content_copy
download
Use code with caution.
Harbour

158. SelectRow( nOperation )

Description: Selects or deselects the current row in multi-select mode (internal method, likely used by Select).

Parameters:

nOperation: NUMERIC - Operation code (similar to Select, but specifically for the current row).

Return Value: None

Usage Example: (Internal use only)

159. Adjust()

Description: Adjusts the layout and appearance of the browse control, recalculating heights, widths, and other visual elements based on current settings.

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Adjust() // Recalculates and adjusts browse layout.
content_copy
download
Use code with caution.
Harbour

160. Check_oSeek()

Description: Checks and handles the oSeek object (incremental seek input) (internal method).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

161. SetSortBmp()

Description: Sets the bitmaps used for sort indicators in column headers (internal method).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

162. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )

Description: Automatically adjusts column widths to fit their content.

Parameters:

aColsToFit: ARRAY - Array of column indices or TxBrwColumn objects to auto-fit. If NIL, auto-fits all columns.

nRows: NUMERIC - Number of rows to consider when calculating column widths. If NIL, considers all rows.

lDataOnly: LOGICAL - .T. to consider only data rows for width calculation, .F. to include header and footer.

nMaxWidth: NUMERIC - Maximum width for columns (optional).

Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.

Usage Example:

oBrw:AutoFit() // Auto-fits all columns to their content.
oBrw:AutoFit( { 1, 3 } ) // Auto-fits columns 1 and 3.
oBrw:AutoFit( , 100 ) // Auto-fits columns considering only the first 100 rows.
content_copy
download
Use code with caution.
Harbour

163. CheckSize()

Description: Checks and adjusts the size of the browse control based on margins and padding (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

164. Resize( nSizeType, nWidth, nHeight )

Description: Resizes the browse control to the specified dimensions or using predefined size types.

Parameters:

nSizeType: NUMERIC - Size type code (e.g., SIZE_PIXEL, SIZE_CLIENT, SIZE_WINDOW).

nWidth: NUMERIC - New width in pixels (if nSizeType is SIZE_PIXEL).

nHeight: NUMERIC - New height in pixels (if nSizeType is SIZE_PIXEL).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Resize( SIZE_PIXEL, 800, 600 ) // Resizes browse to 800x600 pixels.
oBrw:Resize( SIZE_CLIENT ) // Resizes browse to fill client area of parent window.
content_copy
download
Use code with caution.
Harbour

165. Change( lRow )

Description: Handles the change event, triggered when the selected row changes or a column is modified.

Parameters:

lRow: LOGICAL - .T. if the change is due to row selection, .F. if due to column change.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use, called automatically when row or column selection changes)

166. MakeTotals( aCols )

Description: Calculates totals for specified columns and prepares them for display in the footer (internal method).

Parameters:

aCols: ARRAY - Array of column indices or TxBrwColumn objects to calculate totals for.

Return Value: None

Usage Example: (Internal use only)

167. SaveTotals( lBlank )

Description: Saves the calculated totals (internal method).

Parameters:

lBlank: LOGICAL - .T. to blank out existing totals before saving, .F. otherwise.

Return Value: None

Usage Example: (Internal use only)

168. ReCalcTotals( lReduce )

Description: Recalculates totals based on changes in data or filtering (internal method).

Parameters:

lReduce: LOGICAL - .T. to reduce totals based on filtered data, .F. otherwise.

Return Value: None

Usage Example: (Internal use only)

169. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )

Description: General-purpose evaluation method for codeblocks, allowing iteration over browse rows with conditions and limits.

Parameters:

bBlock: CODEBLOCK - Codeblock to be evaluated for each row.

bFor: CODEBLOCK - Codeblock to be evaluated before each row (condition for row processing).

bWhile: CODEBLOCK - Codeblock for loop continuation condition.

nNext: NUMERIC - Number of rows to process (optional).

nRec: NUMERIC - Starting record number (optional).

lRest: LOGICAL - .T. to process from current record to end, .F. otherwise (optional).

Return Value: None

Usage Example:

oBrw:Eval( { |o| MsgInfo( o:Column1 ) }, , { || oBrw:Eof() } ) // Iterates through all rows and displays "Column1" value in each row.
content_copy
download
Use code with caution.
Harbour

170. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )

Description: Generates a report from the browse data, allowing for preview, printing, and exporting to PDF.

Parameters:

cTitle: CHARACTER - Title for the report.

lPreview: LOGICAL - .T. to show print preview dialog, .F. for direct printing.

lModal: LOGICAL - .T. to show print preview dialog as modal, .F. as modeless.

bSetUp: CODEBLOCK - Codeblock to customize report setup (optional).

aGroupBy: ARRAY - Array of column indices or TxBrwColumn objects to group data by (optional).

cPDF: CHARACTER - Path to save the report as PDF (optional, if provided, exports to PDF directly).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the report (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Report( "Customer Report", .T., .T., , { 2 }, "customer_report.pdf" ) // Generates a previewable PDF report grouped by the 2nd column.
content_copy
download
Use code with caution.
Harbour

171. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )

Description: Exports browse data to a Microsoft Word document.

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in the Word document (optional).

nWrdTblFormat: NUMERIC - Word table format code (optional).

nPageOrientation: NUMERIC - Page orientation (0 for portrait, 1 for landscape, optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:ToWord( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, , 5 ) // Exports data to Word with progress display.
content_copy
download
Use code with caution.
Harbour

172. ToHTML( cHtml, lShow )

Description: Exports browse data to an HTML file.

Parameters:

cHtml: CHARACTER - Path to save the HTML file.

lShow: LOGICAL - .T. to open the HTML file after export, .F. otherwise.

Return Value: None

Usage Example:

oBrw:ToHTML( "browse_data.html", .T. ) // Exports data to HTML and opens the file in browser.
content_copy
download
Use code with caution.
Harbour

173. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )

Description: Exports browse data to a CSV (Comma Separated Values) file.

Parameters:

cFile: CHARACTER - Path to save the CSV file.

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in CSV (optional).

lHeaders: LOGICAL - .T. to include column headers in CSV, .F. otherwise.

cTrue: CHARACTER - String representation for logical TRUE value in CSV (optional).

cFalse: CHARACTER - String representation for logical FALSE value in CSV (optional).

cDelim: CHARACTER - Delimiter character for CSV (optional, default is comma).

Return Value: None

Usage Example:

oBrw:ToCSV( "browse_data.csv", , .T., "Yes", "No", ";" ) // Exports to CSV with custom delimiter and logical value representations.
content_copy
download
Use code with caution.
Harbour

174. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )

Description: Exports browse data to an Excel spreadsheet file (XLS or XLSX).

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

nGroupBy: NUMERIC - Column index to group data in Excel (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Excel (optional).

lShow: LOGICAL - .T. to open Excel after export, .F. otherwise.

cPDF: CHARACTER - Path to save as PDF in addition to Excel (optional).

bPrePDF: CODEBLOCK - Codeblock to execute before PDF export (optional).

Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.

Usage Example:

oBrw:ToExcel( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, , .T., "browse_data.pdf" ) // Exports to Excel with grouping, progress display, and PDF export.
content_copy
download
Use code with caution.
Harbour

175. ToXlsx( cFileXls, aCols )

Description: Exports browse data to an XLSX (Excel 2007+) file.

Parameters:

cFileXls: CHARACTER - Path to save the XLSX file.

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in XLSX (optional).

Return Value: None

Usage Example:

oBrw:ToXlsx( "browse_data.xlsx" ) // Exports data to XLSX file.
content_copy
download
Use code with caution.
Harbour

176. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )

Description: Exports browse data to a LibreOffice Calc spreadsheet file.

Parameters:

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

nGroupBy: NUMERIC - Column index to group data in Calc (optional).

nPasteMode: NUMERIC - Paste mode for Calc (optional).

aSaveAs: ARRAY - Array for save-as options (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in Calc (optional).

Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.

Usage Example:

oBrw:ToCalc( { |n, t| DispOut( "Exporting row " + n + " of " + t ) }, 2, 2 ) // Exports to Calc with grouping and paste mode 2.
content_copy
download
Use code with caution.
Harbour

177. ToDbf( cFile, bProgress, aCols, lPrompt )

Description: Exports browse data to a DBF (dBase) file.

Parameters:

cFile: CHARACTER - Path to save the DBF file.

bProgress: CODEBLOCK - Codeblock to display export progress (optional).

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in DBF (optional).

lPrompt: LOGICAL - .T. to prompt user for file overwrite confirmation, .F. otherwise.

Return Value: None

Usage Example:

oBrw:ToDbf( "browse_data.dbf", , , .T. ) // Exports to DBF with overwrite prompt enabled.
content_copy
download
Use code with caution.
Harbour

178. ToArray( aCols )

Description: Exports browse data to a two-dimensional array.

Parameters:

aCols: ARRAY - Array of column indices or TxBrwColumn objects to include in array (optional).

Return Value: ARRAY - Returns the two-dimensional array containing browse data.

Usage Example:

myDataArray := oBrw:ToArray() // Exports all visible columns to an array.
content_copy
download
Use code with caution.
Harbour

179. CurrentRow()

Description: Returns a TXBrwRow object representing the data of the currently selected row.

Parameters: None

Return Value: OBJECT - Returns a TXBrwRow object.

Usage Example:

oCurrentRow := oBrw:CurrentRow() // Gets a TXBrwRow object for the current row.
content_copy
download
Use code with caution.
Harbour

180. AddBitmap( uBmp, aResize )

Description: Adds a bitmap to the browse control's bitmap collection for use in columns or other visual elements.

Parameters:

uBmp: CHARACTER or NUMERIC - Path to bitmap file or bitmap handle.

aResize: - Resize parameters (optional).

Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.

Usage Example:

nBitmapIndex := oBrw:AddBitmap( "mybitmap.bmp" ) // Adds a bitmap to the browse's bitmap collection.
content_copy
download
Use code with caution.
Harbour

181. aBitmap( n )

Description: Accessor method to retrieve a bitmap from the browse control's bitmap collection by its index.

Parameters:

n: NUMERIC - Index of the bitmap in the aBitmaps array.

Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.

Usage Example:

hBitmap := oBrw:aBitmap( nBitmapIndex ) // Retrieves a bitmap by its index.
content_copy
download
Use code with caution.
Harbour

182. Initiate( hDlg )

Description: Initializes the browse control (internal method).

Parameters:

hDlg: - Handle to the dialog window (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only)

183. Display()

Description: Displays the browse control (internal method).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only)

184. Paint()

Description: Paints the browse control's content (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called by the windowing system during redraw)

185. DrawBorder()

Description: Draws the border around the browse control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only, called during painting)

186. CheckSortCbx()

Description: Checks and updates the sort checkbox control (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

187. GetPaintCols( nLast )

Description: Retrieves an array of columns to be painted, optimized for performance (internal method).

Parameters:

nLast: NUMERIC - Last displayed column index.

Return Value: ARRAY - Array of TxBrwColumn objects to paint.

Usage Example: (Internal use only)

188. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )

Description: Paints a horizontal divider line (internal method).

Parameters:

hDC: OBJECT - Device context handle.

nRow: NUMERIC - Row position.

nLeft: NUMERIC - Left position.

nRight: NUMERIC - Right position.

nStyle: NUMERIC - Line style.

hRowPen: OBJECT - Pen handle for row lines.

hWhitePen: OBJECT - Pen handle for white color.

Return Value: None

Usage Example: (Internal use only)

189. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )

Description: Paints a vertical divider line (internal method).

Parameters:

hDC: OBJECT - Device context handle.

nCol: NUMERIC - Column position.

nTop: NUMERIC - Top position.

nBottom: NUMERIC - Bottom position.

nStyle: NUMERIC - Line style.

hColPen: OBJECT - Pen handle for column lines.

hWhitePen: OBJECT - Pen handle for white color.

Return Value: None

Usage Example: (Internal use only)

190. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )

Description: Paints the header area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

aCols: ARRAY - Array of columns to paint.

nLast: NUMERIC - Last displayed column index.

hWhitePen: OBJECT - Pen handle for white color.

hGrayPen: OBJECT - Pen handle for gray color.

hColPen: OBJECT - Pen handle for column lines.

Return Value: None

Usage Example: (Internal use only)

191. PaintTopBar( hDC, hGrayPen )

Description: Paints the top bar area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

hGrayPen: OBJECT - Pen handle for gray color.

Return Value: None

Usage Example: (Internal use only)

192. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )

Description: Paints the footer area of the browse (internal method).

Parameters:

hDC: OBJECT - Device context handle.

aCols: ARRAY - Array of columns to paint.

nLast: NUMERIC - Last displayed column index.

nGridWidth: NUMERIC - Grid width.

nBrwHeight: NUMERIC - Browse height.

hWhitePen: OBJECT - Pen handle for white color.

hGrayPen: OBJECT - Pen handle for gray color.

Return Value: None

Usage Example: (Internal use only)

193. Refresh( lComplete )

Description: Refreshes the browse control, redrawing its content.

Parameters:

lComplete: LOGICAL - .T. for a full refresh, .F. for partial refresh (optional).

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Refresh() // Performs a full refresh.
oBrw:Refresh( .F. ) // Performs a partial refresh.
content_copy
download
Use code with caution.
Harbour

194. CalcRowSelPos()

Description: Calculates the position of the selected row (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

195. DelRepos()

Description: Repositions browse after record deletion (internal method).

Parameters: None

Return Value: None

Usage Example: (Internal use only)

196. KeyCount()

Description: Returns the total number of rows in the data source.

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example:

nRowCount := oBrw:KeyCount()
content_copy
download
Use code with caution.
Harbour

197. BookMark( uGoTo )

Description: Sets or gets the bookmark position (record number).

Parameters:

uGoTo: NUMERIC - Record number to bookmark (optional).

Return Value: NUMERIC - Returns the current bookmark value (record number).

Usage Example:

nBookmarkValue := oBrw:BookMark() // Gets current bookmark value.
oBrw:BookMark( 15 ) // Sets bookmark to record number 15.
content_copy
download
Use code with caution.
Harbour

198. KeyNo( nKeyGoTo )

Description: Sets or gets the key number (vertical scroll position).

Parameters:

nKeyGoTo: NUMERIC - Key number to set (optional).

Return Value: NUMERIC - Returns the current key number.

Usage Example:

nKeyNumber := oBrw:KeyNo() // Gets current key number.
oBrw:KeyNo( 50 ) // Sets key number to 50.
content_copy
download
Use code with caution.
Harbour

199. Skip( n )

Description: Skips rows forward or backward.

Parameters:

n: NUMERIC - Number of rows to skip (positive for forward, negative for backward).

Return Value: NUMERIC - Number of rows actually skipped.

Usage Example:

nSkippedRows := oBrw:Skip( 5 ) // Skips 5 rows forward.
content_copy
download
Use code with caution.
Harbour

200. Bof()

Description: Checks if the browse is at the Beginning Of File (BOF).

Parameters: None

Return Value: LOGICAL - .T. if BOF, .F. otherwise.

Usage Example:

if oBrw:Bof()
    MsgInfo( "At the beginning of the data." )
endif
content_copy
download
Use code with caution.
Harbour

201. Eof()

Description: Checks if the browse is at the End Of File (EOF).

Parameters: None

Return Value: LOGICAL - .T. if EOF, .F. otherwise.

Usage Example:

if oBrw:Eof()
    MsgInfo( "At the end of the data." )
endif
content_copy
download
Use code with caution.
Harbour

202. GoTop()

Description: Moves the browse cursor to the first row (Top of File - TOF).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoTop() // Moves to the first row.
content_copy
download
Use code with caution.
Harbour

203. GoBottom()

Description: Moves the browse cursor to the last row (Bottom of File - BOF).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoBottom() // Moves to the last row.
content_copy
download
Use code with caution.
Harbour

204. GoUp( nUp )

Description: Moves the browse cursor up by a specified number of rows.

Parameters:

nUp: NUMERIC - Number of rows to move up (default is 1).

Return Value: None

Usage Example:

oBrw:GoUp() // Moves up one row.
oBrw:GoUp( 3 ) // Moves up three rows.
content_copy
download
Use code with caution.
Harbour

205. GoDown( nDown, nKey )

Description: Moves the browse cursor down by a specified number of rows.

Parameters:

nDown: NUMERIC - Number of rows to move down (default is 1).

nKey: NUMERIC - Key code (optional, used internally).

Return Value: None

Usage Example:

oBrw:GoDown() // Moves down one row.
oBrw:GoDown( 5 ) // Moves down five rows.
content_copy
download
Use code with caution.
Harbour

206. PageUp( nLines )

Description: Moves the browse cursor up by a page (number of visible data rows).

Parameters:

nLines: NUMERIC - Number of lines to page up (default is number of data rows).

Return Value: None

Usage Example:

oBrw:PageUp() // Pages up one page of data.
content_copy
download
Use code with caution.
Harbour

207. PageDown( nLines )

Description: Moves the browse cursor down by a page (number of visible data rows).

Parameters:

nLines: NUMERIC - Number of lines to page down (default is number of data rows).

Return Value: None

Usage Example:

oBrw:PageDown() // Pages down one page of data.
content_copy
download
Use code with caution.
Harbour

208. GoLeft()

Description: Moves the browse cursor one column to the left.

Parameters:

lOffset: NUMERIC - Offset to move left (optional, default is 1).

lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.

Usage Example:

oBrw:GoLeft() // Moves one column to the left.
content_copy
download
Use code with caution.
Harbour

209. GoRight()

Description: Moves the browse cursor one column to the right.

Parameters:

lOffset: NUMERIC - Offset to move right (optional, default is 1).

lRefresh: LOGICAL - .T. to refresh browse after moving, .F. otherwise.

Return Value: LOGICAL - Returns .T. if navigation successful, .F. otherwise.

Usage Example:

oBrw:GoRight() // Moves one column to the right.
content_copy
download
Use code with caution.
Harbour

210. GoLeftMost()

Description: Moves the browse cursor to the leftmost visible column.

Parameters: None

Return Value: None

Usage Example:

oBrw:GoLeftMost() // Moves to the first visible column.
content_copy
download
Use code with caution.
Harbour

211. GoRightMost()

Description: Moves the browse cursor to the rightmost visible column.

Parameters: None

Return Value: None

Usage Example:

oBrw:GoRightMost() // Moves to the last visible column.
content_copy
download
Use code with caution.
Harbour

212. GoFirstEditCol()

Description: Moves the browse cursor to the first editable column in the current row.

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example:

oEditColumn := oBrw:GoFirstEditCol() // Moves cursor to the first editable column.
content_copy
download
Use code with caution.
Harbour

213. HandleEvent( nMsg, nWParam, nLParam )

Description: Handles window messages (internal method, event dispatcher).

Parameters:

nMsg: NUMERIC - Windows message code.

nWParam: NUMERIC - WPARAM parameter of the message.

nLParam: NUMERIC - LPARAM parameter of the message.

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - handles Windows messages)

214. HandleGesture( nGesture, nLParam )

Description: Handles gesture events (internal method, for kinetic scrolling and touch gestures).

Parameters:

nGesture: NUMERIC - Gesture ID.

nLParam: NUMERIC - LPARAM parameter of the gesture event.

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - handles touch and kinetic scrolling)

215. GesturePan( aPanInfo )

Description: Handles pan gestures (used for kinetic scrolling, internal method).

Parameters:

aPanInfo: ARRAY - Array containing pan gesture information.

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - handles kinetic scrolling gestures)

216. KeyCount()

Description: Returns the number of records (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example:

rowCount := oBrw:KeyCount() // Gets row count using codeblock.
content_copy
download
Use code with caution.
Harbour

217. BookMark()

Description: Accessor for Bookmark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example:

bookmarkValue := oBrw:BookMark() // Gets bookmark value using codeblock.
content_copy
download
Use code with caution.
Harbour

218. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the key number.

Usage Example:

keyNumber := oBrw:KeyNo() // Gets key number using codeblock.
content_copy
download
Use code with caution.
Harbour

219. Skip()

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: - Returns the number of rows skipped.

Usage Example:

rowsSkipped := oBrw:Skip( 2 ) // Skips rows using codeblock.
content_copy
download
Use code with caution.
Harbour

220. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example:

isBOF := oBrw:Bof() // Checks BOF using codeblock.
content_copy
download
Use code with caution.
Harbour

221. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example:

isEOF := oBrw:Eof() // Checks EOF using codeblock.
content_copy
download
Use code with caution.
Harbour

222. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoTop() // Moves to top using codeblock.
content_copy
download
Use code with caution.
Harbour

223. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:GoBottom() // Moves to bottom using codeblock.
content_copy
download
Use code with caution.
Harbour

224. GoFltRow( n )

Description: Accessor for GoFltRow (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Filter row index.

Return Value: NUMERIC - Returns the filter row index.

Usage Example: (Internal use only - method version for codeblock usage)

225. SaveState( aAdditionalData )

Description: Accessor for SaveState (same as DATA member, method version for codeblock usage).

Parameters:

aAdditionalData: ARRAY - Additional data array.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

226. RestoreState( cState )

Description: Accessor for RestoreState (same as DATA member, method version for codeblock usage).

Parameters:

cState: CHARACTER - State string.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

227. OldRestoreState( cState )

Description: Accessor for OldRestoreState (same as DATA member, method version for codeblock usage).

Parameters:

cState: CHARACTER - State string.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

228. Lock()

Description: Accessor for Lock (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if lock is successful, .F. otherwise.

Usage Example:

isLocked := oBrw:Lock() // Locks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour

229. UnLock()

Description: Accessor for UnLock (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns NIL always (likely a typo in original documentation, should probably be .T. on success).

Usage Example:

oBrw:UnLock() // Unlocks the browse using codeblock.
content_copy
download
Use code with caution.
Harbour

230. SaveData( lRefresh )

Description: Accessor for SaveData (same as DATA member, method version for codeblock usage).

Parameters:

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if save is successful, .F. otherwise.

Usage Example:

isSaved := oBrw:SaveData( .T. ) // Saves data using codeblock.
content_copy
download
Use code with caution.
Harbour

231. ShowSeek()

Description: Accessor for ShowSeek (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example:

oBrw:ShowSeek() // Shows seek input using codeblock.
content_copy
download
Use code with caution.
Harbour

232. Seek( cSeek )

Description: Accessor for Seek (same as DATA member, method version for codeblock usage).

Parameters:

cSeek: CHARACTER - Seek string.

Return Value: LOGICAL - Returns .T. if seek is successful, .F. otherwise.

Usage Example:

isFound := oBrw:Seek( "Search String" ) // Performs seek using codeblock.
content_copy
download
Use code with caution.
Harbour

233. Adjust()

Description: Accessor for Adjust (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example:

oBrw:Adjust() // Adjusts layout using codeblock.
content_copy
download
Use code with caution.
Harbour

234. Check_oSeek()

Description: Accessor for Check_oSeek (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

235. SetSortBmp()

Description: Accessor for SetSortBmp (same as DATA member, method version for codeblock usage).

Parameters:

aBmp: ARRAY - Bitmap array.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

236. AutoFit( aColsToFit, nRows, lDataOnly, nMaxWidth )

Description: Accessor for AutoFit (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member AutoFit)

Return Value: OBJECT - Returns an ARRAY { nReqdWidth, nReqdHt } containing the required width and height for the browse.

Usage Example: (Internal use only - method version for codeblock usage)

237. CheckSize()

Description: Accessor for CheckSize (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

238. Resize( nSizeType, nWidth, nHeight )

Description: Accessor for Resize (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Resize)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

239. Change( lRow )

Description: Accessor for Change (same as DATA member, method version for codeblock usage).

Parameters:

lRow: LOGICAL - Row flag.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

Code: Select all | Expand

240. MakeTotals( aCols )

Description: Accessor for MakeTotals (same as DATA member, method version for codeblock usage).

Parameters:

aCols: ARRAY - Columns array.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

241. SaveTotals( lBlank )

Description: Accessor for SaveTotals (same as DATA member, method version for codeblock usage).

Parameters:

lBlank: LOGICAL - Blank flag.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

242. ReCalcTotals( lReduce )

Description: Accessor for ReCalcTotals (same as DATA member, method version for codeblock usage).

Parameters:

lReduce: LOGICAL - Reduce flag.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

243. Eval( bBlock, bFor, bWhile, nNext, nRec, lRest )

Description: Accessor for Eval (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Eval)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

244. Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF, aCols )

Description: Accessor for Report (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member Report)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

245. ToWord( bProgress, aCols, nWrdTblFormat, nPageOrientation )

Description: Accessor for ToWord (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToWord)

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

246. ToHTML( cHtml, lShow )

Description: Accessor for ToHTML (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToHTML)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

247. ToCSV( cFile, aCols, lHeaders, cTrue, cFalse, cDelim )

Description: Accessor for ToCSV (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToCSV)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

248. ToExcel( bProgress, nGroupBy, aCols, lShow, cPDF, bPrePDF )

Description: Accessor for ToExcel (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToExcel)

Return Value: OBJECT - Returns the Excel object if export is successful, NIL otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

249. ToXlsx( cFileXls, aCols )

Description: Accessor for ToXlsx (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToXlsx)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

250. ToCalc( bProgress, nGroupBy, nPasteMode, aSaveAs, aCols )

Description: Accessor for ToCalc (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToCalc)

Return Value: OBJECT - Returns the Calc object if export is successful, NIL otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

251. ToArray( aCols )

Description: Accessor for ToArray (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member ToArray)

Return Value: ARRAY - Returns the two-dimensional array containing browse data.

Usage Example: (Internal use only - method version for codeblock usage)

252. CurrentRow()

Description: Accessor for CurrentRow (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns a TXBrwRow object.

Usage Example: (Internal use only - method version for codeblock usage)

253. AddBitmap( uBmp, aResize )

Description: Accessor for AddBitmap (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member AddBitmap)

Return Value: NUMERIC - Returns the index of the added bitmap in the aBitmaps array.

Usage Example: (Internal use only - method version for codeblock usage)

254. aBitmap( n )

Description: Accessor for aBitmap (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member aBitmap)

Return Value: - Returns the bitmap handle at the specified index or NIL if index is invalid.

Usage Example: (Internal use only - method version for codeblock usage)

255. Initiate( hDlg )

Description: Accessor for Initiate (same as DATA member, method version for codeblock usage).

Parameters:

hDlg: - Handle to the dialog window.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

256. Display()

Description: Accessor for Display (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only - method version for codeblock usage)

257. Paint()

Description: Accessor for Paint (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Always returns 0.

Usage Example: (Internal use only - method version for codeblock usage)

258. DrawBorder()

Description: Accessor for DrawBorder (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

259. CheckSortCbx()

Description: Accessor for CheckSortCbx (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

260. GetPaintCols( nLast )

Description: Accessor for GetPaintCols (same as DATA member, method version for codeblock usage).

Parameters:

nLast: NUMERIC - Last column index.

Return Value: ARRAY - Array of columns to paint.

Usage Example: (Internal use only - method version for codeblock usage)

261. PaintHDivider( hDC, nRow, nLeft, nRight, nStyle, hRowPen, hWhitePen )

Description: Accessor for PaintHDivider (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintHDivider)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

262. PaintVDivider( hDC, nCol, nTop, nBottom, nStyle, hColPen, hWhitePen )

Description: Accessor for PaintVDivider (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintVDivider)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

263. PaintHeader( hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen )

Description: Accessor for PaintHeader (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintHeader)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

264. PaintTopBar( hDC, hGrayPen )

Description: Accessor for PaintTopBar (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintTopBar)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

265. PaintFooter( hDC, aCols, nLast, nGridWidth, nBrwHeight, hWhitePen, hGrayPen )

Description: Accessor for PaintFooter (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member PaintFooter)

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

266. Refresh( lComplete )

Description: Accessor for Refresh (same as DATA member, method version for codeblock usage).

Parameters:

lComplete: LOGICAL - Complete refresh flag.

Return Value: OBJECT - Returns the TXBrowse object (Self).

Usage Example: (Internal use only - method version for codeblock usage)

267. CalcRowSelPos()

Description: Accessor for CalcRowSelPos (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

268. DelRepos()

Description: Accessor for DelRepos (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

269. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

270. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters:

u: - Bookmark value.

Return Value: NUMERIC - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

271. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Key number.

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

272. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

273. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

274. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

275. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

276. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

277. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

278. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

279. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

280. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

281. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

282. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

283. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

284. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

285. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

286. HandleEvent( nMsg, nWParam, nLParam )

Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleEvent)

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - method version for codeblock usage)

287. HandleGesture( nGesture, nLParam )

Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleGesture)

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - method version for codeblock usage)

288. GesturePan( aPanInfo )

Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member GesturePan)

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - method version for codeblock usage)

289. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

290. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

291. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

292. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

293. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

294. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

295. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

296. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

297. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

298. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

299. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

300. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

301. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

302. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

303. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

304. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

305. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

306. HandleEvent( nMsg, nWParam, nLParam )

Description: Accessor for HandleEvent (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleEvent)

Return Value: NUMERIC - Message return value.

Usage Example: (Internal use only - method version for codeblock usage)

307. HandleGesture( nGesture, nLParam )

Description: Accessor for HandleGesture (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member HandleGesture)

Return Value: NUMERIC - Gesture event return value.

Usage Example: (Internal use only - method version for codeblock usage)

308. GesturePan( aPanInfo )

Description: Accessor for GesturePan (same as DATA member, method version for codeblock usage).

Parameters: (Same as DATA member GesturePan)

Return Value: NUMERIC - Gesture pan return value.

Usage Example: (Internal use only - method version for codeblock usage)

309. KeyCount()

Description: Accessor for KeyCount (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Total number of rows.

Usage Example: (Internal use only - method version for codeblock usage)

310. BookMark()

Description: Accessor for BookMark (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: - Returns the bookmark value.

Usage Example: (Internal use only - method version for codeblock usage)

311. KeyNo()

Description: Accessor for KeyNo (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: NUMERIC - Returns the key number.

Usage Example: (Internal use only - method version for codeblock usage)

312. Skip( n )

Description: Accessor for Skip (same as DATA member, method version for codeblock usage).

Parameters:

n: NUMERIC - Number of rows to skip.

Return Value: NUMERIC - Number of rows skipped.

Usage Example: (Internal use only - method version for codeblock usage)

313. Bof()

Description: Accessor for Bof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if BOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

314. Eof()

Description: Accessor for Eof (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: LOGICAL - Returns .T. if EOF, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

315. GoTop()

Description: Accessor for GoTop (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

316. GoBottom()

Description: Accessor for GoBottom (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

317. GoUp( nUp )

Description: Accessor for GoUp (same as DATA member, method version for codeblock usage).

Parameters:

nUp: NUMERIC - Number of rows to go up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

318. GoDown( nDown, nKey )

Description: Accessor for GoDown (same as DATA member, method version for codeblock usage).

Parameters:

nDown: NUMERIC - Number of rows to go down.

nKey: NUMERIC - Key code.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

319. PageUp( nLines )

Description: Accessor for PageUp (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page up.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

320. PageDown( nLines )

Description: Accessor for PageDown (same as DATA member, method version for codeblock usage).

Parameters:

nLines: NUMERIC - Number of lines to page down.

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

321. GoLeft( lOffset, lRefresh )

Description: Accessor for GoLeft (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Left offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go left is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

322. GoRight( lOffset, lRefresh )

Description: Accessor for GoRight (same as DATA member, method version for codeblock usage).

Parameters:

lOffset: NUMERIC - Right offset.

lRefresh: LOGICAL - Refresh flag.

Return Value: LOGICAL - Returns .T. if go right is successful, .F. otherwise.

Usage Example: (Internal use only - method version for codeblock usage)

323. GoLeftMost()

Description: Accessor for GoLeftMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

324. GoRightMost()

Description: Accessor for GoRightMost (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: None

Usage Example: (Internal use only - method version for codeblock usage)

325. GoFirstEditCol()

Description: Accessor for GoFirstEditCol (same as DATA member, method version for codeblock usage).

Parameters: None

Return Value: OBJECT - Returns the TxBrwColumn object of the first editable column.

Usage Example: (Internal use only - method version for codeblock usage)

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

Code: Select all | Expand

You're right to ask about how these methods are related! The sheer number of methods in TXBrowse can be overwhelming, but they are designed to work together to provide a rich and functional browse control.

Let's break down how these methods are related by categorizing them based on their roles and interactions:

1. Lifecycle Management (Creation, Destruction, Initialization):

New() and Destroy(): These are the fundamental methods that control the lifespan of a TXBrowse object. New() creates an instance, setting up default properties and resources. Destroy() cleans up and releases those resources when the object is no longer needed.

Initiate( hDlg ): Called internally during the creation process. It sets up scrollbars, default colors, and initializes data-related codeblocks.

Adjust(): Crucially linked to data loading and display. It's called after data is set (via SetRDD, SetArray, etc.) to calculate sizes of rows, columns, headers, footers, and prepare the browse for rendering. It also triggers CheckSize() and CalcHdrHeight() to ensure correct layout.

CheckSize() & CalcHdrHeight() & CalcRowSelPos(): These are helper methods called by Adjust() and Refresh() to recalculate dimensions and positions based on data and style settings. They ensure the browse layout is consistent and correct after data or style changes.

Think of it like building a house: New() is like laying the foundation, Initiate() is like building the basic structure, Adjust() is like fitting windows and doors and ensuring everything is properly sized, and Destroy() is like demolishing the house when it's no longer needed.

2. Data Source Management (Setting and Resetting Data):

SetRDD(), SetArray(), SetoDbf(), SetExcelRange(), SetAdo(), SetTree(), SetColsForTree(), SetDolphin(), SetMySql(): These methods are the entry points for connecting the TXBrowse to different data sources. They are mutually exclusive – you'll use one of them depending on your data origin. They all ultimately trigger Adjust() after setting up the data connection to prepare the browse for display.

ResetData( uSrc, aCols ) & ResetBrowse(): Used to clear the existing data and columns and optionally load new data. ResetBrowse() is a more general reset, while ResetData() specifically handles switching data sources.

Analogy: These methods are like choosing the type of fuel and engine for your car (TXBrowse). You choose one (RDD, Array, etc.) to power the data display. ResetData is like changing the engine entirely, while ResetBrowse is more like just turning off the engine and clearing the dashboard.

3. Navigation Methods (Cursor Movement and Position):

GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), Skip(): These methods provide different ways to move the browse cursor through the data. They are all interconnected as different forms of navigation.

BookMark(), KeyNo(): These methods manage the bookmark and key number (scrollbar position) of the browse. They are often used in conjunction with navigation methods to remember or jump to specific positions.

GoFltRow(n), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(): These methods offer more specialized navigation, like moving to a specific filtered row or navigating horizontally.

Analogy: These are like the steering wheel, pedals, gear shift, and GPS of your car. They allow you to control where you are in the data (the road).

4. Selection Management (Row Selection and Multiselect):

Select( nOperation ), SelectAll(), SelectNone(), SelectRow( nOperation ), IsSelectedRow(): These methods are focused on row selection, especially in multi-select mode. Select() is the core method, with others being convenience wrappers.

SetMultiSelectCol( uCol, lFooter ): Enables multi-selection and links it to a specific column, triggering the use of the selection methods.

Analogy: These are like the car's seatbelt and door locks – features that manage how you interact with the car's contents (data).

5. Editing and Data Modification:

Edit(), EditSource(), EditBrowse(), EditDateTime(): These methods provide different ways to edit data, typically in modal dialogs or in-place (depending on column settings). Edit() acts as a dispatcher, choosing the appropriate editing method.

CancelEdit(): Cancels any ongoing edit operation.

Delete( lMsg ): Deletes the currently selected record.

SaveData( lRefresh ): Saves changes made during editing back to the data source.

ArrCellSet(), ArrCell(): Methods for direct manipulation of array data source cells.

Lock(), UnLock(): Methods for controlling data modification by locking/unlocking the browse.

Analogy: These are like the tools you use to repair or modify your car – wrenches, paintbrushes, etc. They allow you to change the data (car's components).

6. Display and Appearance Methods:

Display(), Paint(), Refresh( lComplete ), RefreshCurrent(), RefreshHeaders(), RefreshFooters(), DrawBorder(), DrawLine(), EraseData(), FullPaint(): These methods are responsible for rendering the browse control visually. Refresh() is the main method for redrawing, while others handle specific parts of the display or optimize refresh operations.

SetStyle(), SetDarkTheme(), SetFont(), FontSize(), SetRecSelBmp(), SetRecSelSl(), SetBackGround(), SetColor(), SetGroupHeader(), SetGroupTotal(), SetMultiSelectCol(), SetChecks(), SetProgBar(): These methods control the visual appearance of the browse, including styles, colors, fonts, bitmaps, and various display elements.

ShowMessage(), CloseMessage(): Methods for displaying and closing temporary message boxes within the browse.

DrawChart(), DrawChartInRect(), PaintBmpAndText(), PaintHeader(), PaintFooter(), PaintHDivider(), PaintVDivider(), PaintTopBar(), PaintCellBack(), PaintCell(), PaintCellBtn(), PaintCellImage(), PaintCellBarCode(): These are lower-level painting methods used internally by Paint() to draw specific elements of the browse, like headers, footers, cells, bitmaps, and various visual styles.

Analogy: These are like the paint job, interior design, and lights of your car – everything that makes it look and present information to the user.

7. Exporting Methods:

ToExcel(), ToXlsx(), ToCalc(), ToWord(), ToHTML(), ToCSV(), ToArray(), ClpRow(), Copy(): These methods provide ways to export the data displayed in the browse to various formats.

Analogy: These are like the car's ability to transport cargo – taking the data (cargo) and putting it in a different format (destination).

8. Event Handling Methods:

HandleEvent(), HandleGesture(), GesturePan(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), KeyDown(), KeyChar(), MouseLeave(), NcMouseMove(): These methods handle various Windows messages and events, allowing the TXBrowse to respond to user interactions (mouse clicks, keyboard input, scrolling, gestures) and system events.

Analogy: These are like the car's sensors and controls that respond to the driver's actions and the environment.

9. Utility/Helper Methods:

MakeBlock(), ArrCalcWidths(), CalcHdrHeight(), CalcRowSelPos(), Check_oSeek(), CheckSize(), ColStretch(), DestroyToolTip(), ColAtPos(), ColPos(), SelectedCol(), IsDisplayPosVisible(), LastDisplayPos(), GetDisplayCols(), GetDisplayColsWidth(), GetPaintCols(), Eval(), SafeEval(), BrwFitSize(), CancelEdit(), CheckSortCbx(), DelRepos(), DrawLine(), EraseData(), GetDlgCode(), HasBorder(), LButtonDown(), LButtonUp(), MouseMove(), LDblClick(), RButtonDown(), MouseWheel(), HorzLine(), MouseAtHeader(), MouseAtFooter(), MouseColPos(), MouseRowPos(), EraseData(), KeyDown(), KeyChar(), HScroll(), VScroll(), VUpdatePos(), VUpdateAll(), VSetPos(), VThumbPos(), VGetPos(), VGetMax(), VGoDown(), VGoUp(), VGetThumbPos(), VGoBottom(), VGoTop(), GetDisplayCols(), GetVisibleCols(), GetDisplayColsWidth(), IsDisplayPosVisible(), LastDisplayPos(), BrwWidth(), GridWidth(), BrwHeight(), HeaderHeight(), FooterHeight(), CalcHdrHeight(), RowCount(), FirstRow(), LastRow(), FooterRow(), DataHeight(), BrwFitSize(), CancelEdit(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoFltRow(), SaveState(), RestoreState(), OldRestoreState(), Lock(), UnLock(), SaveData(), ShowSeek(), Seek(), Adjust(), Check_oSeek(), SetSortBmp(), AutoFit(), CheckSize(), Resize(), Change(), MakeTotals(), SaveTotals(), ReCalcTotals(), Eval(), Report(), ToWord(), ToHTML(), ToCSV(), ToExcel(), ToXlsx(), ToCalc(), ToArray(), CurrentRow(), AddBitmap(), aBitmap(), Initiate(), Display(), Paint(), DrawBorder(), CheckSortCbx(), GetPaintCols(), PaintHDivider(), PaintVDivider(), PaintHeader(), PaintTopBar(), PaintFooter(), Refresh(), CalcRowSelPos(), DelRepos(), KeyCount(), BookMark(), KeyNo(), Skip(), Bof(), Eof(), GoTop(), GoBottom(), GoUp(), GoDown(), PageUp(), PageDown(), GoLeft(), GoRight(), GoLeftMost(), GoRightMost(), GoFirstEditCol(), HandleEvent(), HandleGesture(), GesturePan(): A massive category of internal helper methods used for various tasks like calculations, drawing, size adjustments, event handling, and data manipulation. They are not typically called directly by users but are essential for the internal workings of TXBrowse.

Analogy: These are like the nuts, bolts, wires, and smaller components that make up the car's engine, chassis, and electrical system. They are essential for the car to function correctly, but you don't interact with them directly as a driver.

10. Accessor Methods (SET/GET for DATA members):

Many DATA members have associated ACCESS and ASSIGN methods (often INLINE) that provide controlled access to their values. For example, lSeekBar, lGetBar, l2007, lFlatStyle, l2000, lMultiSelect, lIncrSearch, BookMark, KeyNo, Skip, Bof, Eof, GoFltRow, SaveState, RestoreState, OldRestoreState, Lock, UnLock, SaveData, ShowSeek, Seek, Adjust, Check_oSeek, SetSortBmp, AutoFit, CheckSize, Resize, Change, MakeTotals, SaveTotals, ReCalcTotals, Eval, Report, ToWord, ToHTML, ToCSV, ToExcel, ToXlsx, ToCalc, ToArray, CurrentRow, AddBitmap, aBitmap, Initiate, Display, Paint, DrawBorder, CheckSortCbx, GetPaintCols, PaintHDivider, PaintVDivider, PaintHeader, PaintTopBar, PaintFooter, Refresh, CalcRowSelPos, DelRepos, KeyCount, BookMark, KeyNo, Skip, Bof, Eof, GoTop, GoBottom, GoUp, GoDown, PageUp, PageDown, GoLeft, GoRight, GoLeftMost, GoRightMost, GoFirstEditCol, HandleEvent, HandleGesture, GesturePan().

Analogy: These are like the car's gauges and controls on the dashboard. They allow you to monitor and adjust certain aspects of the car's behavior (browse control's properties).

Interrelationships in Action (Example Workflow):

Let's consider a user sorting a TXBrowse by clicking a header:

User Clicks Header: Mouse click event is captured by HandleEvent().

Header Click Detection: MouseAtHeader() determines the click is in the header area and identifies the clicked column.

Sorting Initiation: HeaderLButtonUp() is called for the clicked column (TxBrwColumn object).

SetOrder() is Called: The SetOrder() method of the TxBrwColumn is invoked, which:

Determines the sort order (ascending/descending).

Updates the cOrder DATA member of the column.

Calls the SetOrder() method of the TXBrowse class.

SetOrder() in TXBrowse Class:

Calls SortArrayData() (if array data source) or initiates SQL sorting (if RDD/SQLRDD).

Sets the lAutoSort flag to .T..

Sets the aSortBmp bitmaps to indicate sort order in header.

Refresh() is Called: Triggers a full refresh of the browse to reflect the sorted data.

Paint() is Called: Redraws the entire browse control, including the sorted data and sort indicator bitmaps in the header.

This example illustrates how various methods from different categories work together to handle a single user action. Many other workflows, like navigation, editing, and filtering, involve similar interactions between different sets of methods.

This detailed breakdown should provide a better understanding of how the numerous methods within the TXBrowse class are interconnected and contribute to its overall functionality. Let me know if you have any specific methods or categories you'd like to explore further!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2953
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by TimStone »

I appreciate these posts. I am actually placing them in OneNote to create current documentation for FWH. As shared before, it is often very difficult to keep up with many of our classes because of the lack of documentation in a singular spot. Instead we have to search multiple locations, and even the source code, to see how to use many of the methods and data.

I may also create a "manual" using Help and Manual that could embrace these outputs, and then make it available to you in both PDF and .hlp formats.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Otto
Posts: 6396
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 8 times
Been thanked: 1 time
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Otto »

Dear Tim,
I’m adding a sentence to the request for the AI to create an HTML page for me right away.
Here is the result as a PDF, for example.
https://mybergland.com/fwforum/tcontrol ... tation.pdf

Best regards,
Otto

Image
Last edited by Otto on Sat Jan 25, 2025 8:49 pm, edited 1 time in total.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6396
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 8 times
Been thanked: 1 time
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Otto »

Dear Tim,
Just at the moment I made the post, the idea occurred to me that you could also have anchor tags created. I also think a keyword directory is no problem.
Best regards,
Otto


https://winhotel-sandbox.com/fwforum/tc ... nchor.html

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
TimStone
Posts: 2953
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Has thanked: 25 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by TimStone »

Otto,

That is very nice ... but as far as I can see, 24.12 has not been released so I don't have access to that functionality.

When I do, HTML would be nice because it is easy to import into Help and Manual to make a true document.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Antonio Linares
Site Admin
Posts: 42393
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 9 times
Been thanked: 41 times
Contact:

Re: Using new Class TDeepSeek for documenting

Post by Antonio Linares »

Dear Tim,

We are very close to publish FWH 24.12

We apologize for the delay
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply