Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Update released. Included the ComboCueRow/ComboCueCol property which lets you determine where to display the combo cue.
It's possible to reset the ComboCueRow/ComboCueCol to -1 so that it is always the current focused cell. (equal .Row/.Col)
To have this "hot-tracking" behavior. Ensure VBFlexGrid.MouseTrack is True and have following code.
Code:
Private Sub VBFlexGrid1_MouseLeave()
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Sub
Private Sub VBFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
VBFlexGrid1.HitTest X, Y
If VBFlexGrid1.HitResult = FlexHitResultNoWhere Then
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
Exit Sub
End If
If VBFlexGrid1.HitRow >= VBFlexGrid1.FixedRows Then
Select Case VBFlexGrid1.HitCol
Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
VBFlexGrid1.ComboCue = FlexComboCueDropDown
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case COL_COMBOBUTTON
VBFlexGrid1.ComboCue = FlexComboCueButton
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Select
Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End If
End Sub
After picking a dropdown ComboBox item, focus goes to mouse Cell, should stay at last dropdown cell, logically.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by DaveDavis
After picking a dropdown ComboBox item, focus goes to mouse Cell, should stay at last dropdown cell, logically.
Easy to make. Use .ComboCue and .CellComboCue at the same time. See code below.
Code:
Private Sub VBFlexGrid1_RowColChange()
Static LastRow As Long, LastCol As Long
VBFlexGrid1.Cell(FlexCellComboCue, LastRow, LastCol) = FlexComboCueNone
If VBFlexGrid1.Row >= VBFlexGrid1.FixedRows Then
Select Case VBFlexGrid1.Col
Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueDropDown
Case COL_COMBOBUTTON
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueButton
Case Else
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueNone
End Select
Else
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueNone
End If
LastRow = VBFlexGrid1.Row
LastCol = VBFlexGrid1.Col
End Sub
Private Sub VBFlexGrid1_MouseLeave()
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Sub
Private Sub VBFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
VBFlexGrid1.HitTest X, Y
If VBFlexGrid1.HitResult = FlexHitResultNoWhere Then
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
Exit Sub
End If
If VBFlexGrid1.HitRow >= VBFlexGrid1.FixedRows Then
Select Case VBFlexGrid1.HitCol
Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
VBFlexGrid1.ComboCue = FlexComboCueDropDown
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case COL_COMBOBUTTON
VBFlexGrid1.ComboCue = FlexComboCueButton
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Select
Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End If
End Sub
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Easy to make. Use .ComboCue and .CellComboCue at the same time. See code below.
Code:
Private Sub VBFlexGrid1_RowColChange()
Static LastRow As Long, LastCol As Long
VBFlexGrid1.Cell(FlexCellComboCue, LastRow, LastCol) = FlexComboCueNone
If VBFlexGrid1.Row >= VBFlexGrid1.FixedRows Then
Select Case VBFlexGrid1.Col
Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueDropDown
Case COL_COMBOBUTTON
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueButton
Case Else
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueNone
End Select
Else
VBFlexGrid1.Cell(FlexCellComboCue, VBFlexGrid1.Row, VBFlexGrid1.Col) = FlexComboCueNone
End If
LastRow = VBFlexGrid1.Row
LastCol = VBFlexGrid1.Col
End Sub
Private Sub VBFlexGrid1_MouseLeave()
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Sub
Private Sub VBFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
VBFlexGrid1.HitTest X, Y
If VBFlexGrid1.HitResult = FlexHitResultNoWhere Then
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
Exit Sub
End If
If VBFlexGrid1.HitRow >= VBFlexGrid1.FixedRows Then
Select Case VBFlexGrid1.HitCol
Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
VBFlexGrid1.ComboCue = FlexComboCueDropDown
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case COL_COMBOBUTTON
VBFlexGrid1.ComboCue = FlexComboCueButton
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Select
Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End If
End Sub
Yes. work as EXPECT. The hot tracking cue will shift to new mouse-on cell after selection, not the current editing cell because mouse is no more on last editing cell...It could confuse user on which is last editing cell.
IMO, keep cue indication is an another option, I prefer.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Experimental feature 'AllowUserFreezing'.
Please test and report any behavior mismatch or suggestions.
After feedback it will be integrated into the current version.
Thanks
Thanks for this easy mode of freezing rows and/or columns. I tried each of the 'AllowUserFreezing' values (0 to 3) and all of them performed as expected.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Dear Krool,
The fixed ComboCue (and DynamicCue on MouseMove too) is visible only if 'AllowUserEditing' is true. Is it possible to have fixed ComboCue visible even if 'AllowUserEditing' is false? Or, is it possible to have AllowUserEditing for a particular column alone?
Actually, in my grid, I want to allow only one column's cells (say 1st column's) to be editable by user. All other columns are non-editable. So, I want to keep 'AllowUserEditing' false and when 1st column cell is clicked, write my own processing code starting with ".StartEdit". But, I want the fixed ComboCue to be visible even before the 1st column cell is clicked. Also, in MouseMove event of 1st column, I want the ComboCues to be shown in the cells of the 1st column (i.e. even when 'AllowUserEditing' is false). Possible?
If not possible, as of now, then what is the best way to allow editing only in 1st column cells and disallow editing in all other columns' cells?
As of now, what I am doing is keeping 'AllowUserEditing' true (so that the ComboCues - both fixed and dynamic - show up normally) and when double-click happens on other columns' cells, I issue a .CancelEdit as follows.
Code:
Private Sub flx2_EnterEdit()
If flx2.Col <> 1 Then
flx2.CancelEdit
End If
End Sub
One problem with the above way to disallow editing is that the blue highlight shows up for a micro second, when I double-click on a cell.
1) Is there a "better" way to achieve what I require (than what I am doing)? I feel that there must be surely a better way out.
2) In case if my method is the way out, then how to avoid the blue highlighting for a microsecond? Not a major issue for me but just wish to know if it can be avoided.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
AllowUserFreezing property now included.
Also the new AfterUserFreeze event fires after a user changed the number of frozen rows or columns.
A BeforeUserFreeze event is not included as it makes no sense. There is only 1 solid line for either frozen rows or columns.
So a cancelling is not meaningful as just setting AllowUserFreezing to Row only, Column only or Both is enough.
Included the new AfterUserResizeEnd event.
The AfterUserResize event has a ByRef NewSize As Long parameter where the app can influence the width/height that will be committed. (like in the ListView control)
However, it may be necessary to synchronize something after the new width/height got applied. This is now where the AfterUserResizeEnd fires.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Update released.
The escape key now cancels any ongoing divider drag operation.
This change will also be applied to the (yet already outdated) VBFLXGRD14.OCX.
Thanks Krool, what I was wondering is how to do a Drag and Drop per column, also implement the same (per row and column) to another vbflexgrid (from vbFlexgrid1 to VbFlexgrid2)
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Included the AllowScrollLock property.
When the scroll lock key is toggled on it allows the user to use the arrow keys to scroll.
The new property defaults to False to not break compatibility or causing surprises by an accidently activate scroll lock.
Also the "overhead" of checking the toggled state for vbKeyScrollLock on all arrows keys input is only when AllowScrollLock is set to True.
The behavior is like in Excel, means arrows keys with..
.. shift state 0 and ctrl state 0 will scroll like a SB_LINE*
.. shift state <> 0 and ctrl state 0 will do nothing.
.. shift state 0 and ctrl state <> 0 will scroll like a SB_PAGE*
.. shift state <> 0 and ctrl state <> 0 will behave normal
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hi! Krool,
your Grid control seems to be better then the ComponentOne grid control, however ComponentOne has the facility to print and save as pdf their control with the vsPrinter and vsPDF8 control.
Also SelectionMode has an option SelectionListBox (so when allowselection = false, the control will work a bit like a listbox, where you can select one row at a time. etc..)
do you have any plans of producing something like that.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Included the AllowScrollLock property.
When the scroll lock key is toggled on it allows the user to use the arrow keys to scroll.
The new property defaults to False to not break compatibility or causing surprises by an accidently activate scroll lock.
Also the "overhead" of checking the toggled state for vbKeyScrollLock on all arrows keys input is only when AllowScrollLock is set to True.
The behavior is like in Excel, means arrows keys with..
.. shift state 0 and ctrl state 0 will scroll like a SB_LINE*
.. shift state <> 0 and ctrl state 0 will do nothing.
.. shift state 0 and ctrl state <> 0 will scroll like a SB_PAGE*
.. shift state <> 0 and ctrl state <> 0 will behave normal
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Semke
Also SelectionMode has an option SelectionListBox (so when allowselection = false, the control will work a bit like a listbox, where you can select one row at a time. etc..)
Yes, that's planned. (Multi-selection on rows)
The idea is to have a selected state bit for a row. (RWIS_SELECTED)
This comes along then with a RowSelected r/w property and read only SelectedRow/SelectedRows property. (For enum like in vsFlexGrid)
What I'm not sure if I should add a selection mode ListBox/FreeListBox or have another boolean property "MultiSelect" which is only allowed for selection modes ByRow/FreeByRow.
This would keep a possibility open for CLIS_SELECTED maybe. (Multi select columns)
..
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Included the AllowMultiSelection property. This property can only be set to True for SelectionMode 1 - ByRow or 3 - FreeByRow.
Included the RowSelected/SelectedRow/SelectedRows run-time property. These are automatically set when AllowMultiSelection is set to True.
However, they can be set by code even when AllowMultiSelection is set to False.
Improved AllowSelection property (when set to False) to not restrict..
- ColSel for SelectionMode 1 - ByRow
- RowSel for SelectionMode 2 - ByColumn
To note is that AllowMultiSelection and AllowSelection property are working together and do not restrict each other.
So, in fact it is a legal behavior to have AllowSelection = False and AllowMultiSelection = True.
EDIT:
Below an example to enumerate the selected rows. There are two possible ways.
#1
Code:
For i = 0 To VBFlexGrid1.Rows - 1
If VBFlexGrid1.RowSelected(i) = True Then
Debug.Print "Row: " & i
End If
Next i
#2
Code:
Dim i As Long
For i = 0 To VBFlexGrid1.SelectedRows - 1
Debug.Print "Row: " & VBFlexGrid1.SelectedRow(i)
Next i
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Open question:
When GridLines are None or Raised the focus rect is in either case 1 pixel off. That's the same behavior as in MS(H)FlexGrid.
Shall this be fixed? (Not only focus rect, also in-place editing affected)
If yes, silent fix or by another property?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Open question:
When GridLines are None or Raised the focus rect is in either case 1 pixel off. That's the same behavior as in MS(H)FlexGrid.
Shall this be fixed? (Not only focus rect, also in-place editing affected)
If yes, silent fix or by another property?
Personally, I'd like to see you leave it exactly the same as the Microsoft version. Or, if you do fix it, fix it with an option, possibly with a True/False property that's named something like FixGridLinesOffset, and have it default to False.
And here's one rationale for that. I personally have custom controls that use the MSFlexGrid that have overlay textboxes and comboboxes for data entry. If/When I completely switch to your controls, I'd like to be able to do it with a straightforward "drop in", with no tweaking whatsoever.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Included the SheetBorder property.
The default value is True which draws a border around the sheet. (Like MSFlexGrid)
When set to False it draws no such border. (Like MSHFlexGrid)
In vsFlexGrid this 'SheetBorder' specifies just a color, here a boolean.
I found it important to keep full compatibility with MSFlexGrid. Therefore it can't be a color, as the MSFlexGrid uses the fixed pen. (GridColorFixed)
And in vsFlexGrid to have "no border" the dev should set SheetBorder and BackColorBkg to the same color.
Here with the boolean it's truly no border and to behave like a MSHFlexGrid control.
Side question:
Is there a need to customize the appearance of the freeze pane borderlines? (E.g. GridLinesFrozen, GridColorFrozen)
Here I could enhance as no compatibility issue..
Currently it just uses the fixed pen.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Is there a need to customize the appearance of the freeze pane borderlines? (E.g. GridLinesFrozen, GridColorFrozen)
Here I could enhance as no compatibility issue..
Currently it just uses the fixed pen.
Personally, I'll take all the options I can get. I already subclass the MS ListView to make it do several things it doesn't natively do ... specifically related to the color of things. I don't use MSFlexGrid nearly as much as I use ListView, but I do use it. The more options (especially in terms of style and colors), always the better.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Originally Posted by Elroy
Personally, I'll take all the options I can get. I already subclass the MS ListView to make it do several things it doesn't natively do ... specifically related to the color of things. I don't use MSFlexGrid nearly as much as I use ListView, but I do use it. The more options (especially in terms of style and colors), always the better.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
Another question:
FocusRectWidth property is recently added for FlexFocusRectFlat.
That FocusRectWidth has a default value of 1 currently.
What about changing the default value to -1 and exposing either SPI_GETFOCUSBORDERHEIGHT or SPI_GETFOCUSBORDERWIDTH in that case ? (Either the higher or lesser of these two)
That's getting pretty esoteric for me ... and I'm not sure I've got an opinion at this time. I certainly don't currently use the FocusRectWidth property, so I've got no opinion on changing how that behaves. I've certainly got no objection to exposing some read-only properties.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Elroy
Personally, I'd like to see you leave it exactly the same as the Microsoft version. Or, if you do fix it, fix it with an option, possibly with a True/False property that's named something like FixGridLinesOffset, and have it default to False.
And here's one rationale for that. I personally have custom controls that use the MSFlexGrid that have overlay textboxes and comboboxes for data entry. If/When I completely switch to your controls, I'd like to be able to do it with a straightforward "drop in", with no tweaking whatsoever.
I don't see a compatibility break, just a visual difference.
I just released an update so that all places take the offsets now from a central routine to make this more transparent.
Code:
Private Sub GetGridLineOffsets(ByVal iRow As Long, ByVal iCol As Long, ByRef GridLineOffsets As TGRIDLINEOFFSETS)
' The grid line offsets in MS(H)FlexGrid are hard-coded for all scenarios as per below values.
' However, in future these could be fixed by an opt-in property to get the correct values.
GridLineOffsets.LeftTop.CX = 0
GridLineOffsets.LeftTop.CY = 0
GridLineOffsets.RightBottom.CX = 1
GridLineOffsets.RightBottom.CY = 1
End Sub
Currently these are the values to be "visual compatible" with the MS(H)FlexGrid.
However, fixing this in future with an "FixGridLineOffsets" is perhaps the best idea.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Arnoutdv
Is there also a BeforeEdit event in which you can cancel the input for given cells?
I know you've been using the vsflexgrid for a long time and you have a good knowledge of its functionality in terms of events, methods and properties. I wonder to what extent this new control manages to reproduce the vsflexgrid features. Does this control allow you to merge cells, autosize rows and columns or other stuff such as Sort, BindToArray, GetMergedRange, LoadArray, SaveGrid etc. ? I am curious which is your opinion.
"VB code is practically pseudocode" - Tanner Helland "When you do things right, people won't be sure you've done anything at all" - Matt Groening "If you wait until you are ready, it is almost certainly too late" - Seth Godin "Believe nothing you hear, and only one half that you see" - Edgar Allan Poe
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
One open question. (concerning right-to-left)
The Alignment enum FlexAlignmentGeneral says that numbers and dates are left-aligned and otherwise right-aligned.
When RightToLeftLayout is True this is of course flipped.
However, when only RightToLeft is True (and RightToLeftLayout is False, means only RTL-Reading) then it is up to the coder to either right or left align accordingly.
But for FlexAlignmentGeneral there is no way to flip the alignment in that case.
Should I include an 'FlexAlignmentGeneralMirror' enum to have a solution in that case ?
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Originally Posted by Krool
One open question. (concerning right-to-left)
The Alignment enum FlexAlignmentGeneral says that numbers and dates are left-aligned and otherwise right-aligned.
When RightToLeftLayout is True this is of course flipped.
However, when only RightToLeft is True (and RightToLeftLayout is False, means only RTL-Reading) then it is up to the coder to either right or left align accordingly.
But for FlexAlignmentGeneral there is no way to flip the alignment in that case.
Should I include an 'FlexAlignmentGeneralMirror' enum to have a solution in that case ?
I answer this to myself now.
Having 2 General enums causes other issues.
So I decided to include a new property 'MirrorAlignGeneral'.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Included now ComboButtonAlignment/ColComboButtonAlignment property.
This may be helpful for right-to-left properties. For RightToLeftLayout = True it should stay as 1 - Right as the mirror placement flips it anyway. So this is just a need for rtl reading only.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I just updated the documentation and compile/update utility which now handles VBFLXGRDxx.OCX files up through the just-released v1.5 and VBCCRxx.OCX up through the current v1.7. It is located at the bottom of the post #1 inthis thread.
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Dear all,
Is it possible to bind (in some way or other) the VBFlexGrid to a database table so that as I scroll the grid, only the data pertaining to the visible rows get displayed in the VBFlexGrid? The other rows should not hold any data internally. Otherwise, I see (via task manager) that the memory used jumps up greatly. For my purposes, the non-visible rows not containing data is not an issue.
In fact, if the rows of the grid can be always set and maintained to a fixed value, equal to the number of visible rows (say 30), but corresponding data can still be shown (from the database table) just for visible rows alone [with col(0) showing the varying row(record) number, say 31 to 60 or 1100 to 1029 or 329001 to 329030 or ... or ..., as user scrolls the grid] that is even more ideal since I see that even empty rows (without any data) occupy a chunk of memory.
Of course, I can write code to achieve the above (I have some ideas on how to go about it) but just wanted to know whether any direct or a 'short and easy' method is already available so that I need not invest time to write my aforesaid code (which I think I might take some considerable time to develop, to get it running to perfection, since I am not anywhere near the experts like many of you here, to churn out the fastest and shortest codes, that too in so quick a time!, whenever the need arises).
Thanks in advance.
And, I take this opportunity to once again thank you Krool and all other great souls like you here in this Forum - Olaf and many more... God bless you all!