Bob, You can simulate this using ObjectPal as outlined below. The code
was written by Darko Majdic and called aLib. I'm not sure where you can
get it. Regards Paul.
-----------
How to use aLib
---------
Example is functional with unbounded TF,
but for real test bound a table to TF.
Code should work with any 32 bit Paradox version, at least.
User's code (code not contained in aLIB) expects ui names:
tfAB to be the name of TF.
tfAB_HBAR to be the name of Custom HBAR.
Adjust the names if necessary.
aLIB can support more than one TF on a form.
aLIB as a library could support TF's across a forms as well.
Features:
1. Switching TF to an arbitrary arrangement of columns.
Given example uses drop-down list for that feature.
Other approach is using popup menu activated by right mouse click
over
TF header. Menu items are:
"Save as default" Saves current TF arrangement to
:PRIV:MyApp.ini
"Restore default" Restores TF arrangement from :PRIV:MyApp.ini
"Reset" Restores TF's intrinsic arrangement
2. Rearranging columns using drag and drop.
Draging starts pressing left mouse over TF header area.
Draging ends (droping) releasing left mouse somewhere over TF.
3. Custom Horizontal Scroll bar with LockColumns feature.
Custom HBAR has blue colored marker "<>" on it.
Draging/droping marker you can control number of locked columns.
Other approach is using popup menu activated by right mouse click
over
TF header. Menu item is "Lock preceeding columns".
If number of locked columns is > 0 then aLIB.tfcHbarAction() method
takes control over some TF's actions. For example, you will notice
that Ctrl+R functionality is redefined.
4. Aditional fetures.
4.1 TfcFlags.
Using tfcInit() method you can also set tfcFlags.
Value "-1" means "use defaults"
Value < 0 means "toggle state of flag(s)"
Value > 0 means "set flag(s)"
Using aLib methods tfcFlagsGet() and tfcFlagsSet() you can manipulate
with tfcFlags:
Controlling Menu contents:
Value "1" enables Save/Restore/Reset Menu items
Value "2" enables LockPreceedingColumns Menu item.
Other:
Value "4" enables "Coloring of Locked area" feture.
Please, see aLib.Const section for tfcFlag definitions.
Default value is "7" what means that all 3 options are enabled.
4.1 Coloring of Locked area.
This feature is enabled by default.
If you want to disable it, please, see example in Action method.
If you want to change color used:
In

riv:MyApp.ini file, section "TFC", add line like:
TFC_BGLOCK_COLOR=16775408
"16775408" is long integer value of AliceBlue color.
16119285", WhiteSmoke, is hard coded default.
You can use any color you want.
Be aware that colors given above are not from 256 color palette.
In a real use, any combination of given features can be used.
What is not needed can be, simple as is, deleted. (That do not
applies
to aLIB contents.)
Minimal code at TF is:
Var and Type section (which can be moved to upper level if needed).
Open method with postAction().
Action method with it's parts relevant for initialization.
Plus any of features, if not all, wanted.
Examples,
To remove DragNDrop:
delete MouseDown, MouseMove, MouseUp methods at TF's header
level.
To remove Menu:
delete MouseRightUp method at TF's header level
To remove SwitchArrangement:
delete ddArrangement at page level
To remove HBAR:
delete tfAB_HBAR at page level
adjust TF's action method.
All features are enabled by default,
find a combination which fits your needs the best.
Ivica Kolar, 2003-03-09
Customizing Permutation example code - basics
---------------------------------------------
Permutation example can do couple of things. One of them is to arrange
fields of a table frame in order as selected in drop down list
(combo box).
Another thing is possibility to drag and drop any column from the
table
frame on the position of another column.
Code is presented without any data model. So read this short
instructions
on how to make the code work with any table you want.
1. You need to setup data model for the table you wish to work with
using
this table frame.
2. Define the fields in the table frame. The fields you want to work
with
must have 'tab stop' property enabled.
3. Next thing you want to do is to define constants for the drop down
field.
This constants will control the order of arrangement of the columns
in
the table frame. Constants are attached to 'ddArrangement'
object's
'const' method.
4. Name of the table frame object should be 'tfAB'. Off course, you
can
change single occurrence of 'tfAB' in the code if you want to use
some
other name of table frame.
This is just the basic principle.
For instance, imagine it in conjunction with change of table
indexes.
If you want to include that features to your App add aLib contents
to your library.
Initial number of columns in the table frame is 16. You will notice
that
drag and drop combinations are pretty wide.
To be exact there are 20.922.789.888.000 possible combinations.
All of them working. I've checked ;-)
instructions written by:
Darko Majdic, KVID
telpro (AT) kvid (DOT) hr
}
Bob Babcock wrote:
Quote:
Paradox tables have a scroll lock that I can set with the mouse (pair of
blue triangles at the bottom of the table). Question: can I set this with
ObjectPal? |