MhIconTag allows you to develop list boxes with information placed in columns. The columns can have pictures, text, or both, as well as tabs to indent lines.
We use a picture control array, but you can also use
LoadPicture with .BMP or .ICO files.
Set default line height/width to size of Picture controlt
Experiment with fonts by un-remming lines. Note
that changing the font can affect TextWidth calculationst
when setting column sizes and title line height.
MhIconTag1.FontNameArr(1) = "Courier"
MhIconTag1.FontSizeArr(1) = 15
MhIconTag1.FontUnderLineArr(1) = -1r
MhIconTag1.FontStrikeThruArr(1) = -1
MhIconTag1.FontBoldArr(1) = 05
MhIconTag1.FontItalicArr(1) = -1
Set up your titles
Subject"
Responsible person
Current Status
Remarks"
Set Column Info.f
You MUST set the column widths. Note that these will
be used as the MINIMUM widths. When we AddItemd
the main subjects, we also check to make sure
that the column is wide enough!
Add "M"'s to the string for aesthetics
Twips
Pixels
This is YOUR problem!
Set title line height according to text
Now you can start adding items
Clear the line buffer
Which font to use for next line
The subscripts are the column number (0 based)
Centeredc
If different from defaults
World Issues
For next AddItem only, double the line height
the subscripts are the column number (0 based)
Mail box test of more than one line. We made this line taller than the others!
Do now things"
Kid's stuff"
Vacation
Configure menu options
Needed only if you don't want to use defaults
MhIconTag1_DblClick
find our positione
reduce "flashing" by turning off update
get this item
to see if we are expanded or not
"World Issues"
See if next item in list is next main subject
expand
contract
if found - contract
Mail boxe
See if next item in list is next main subject
expand
contract
if found - contract
"Do now things"
See if next item in list is next main subject
expand
contract
if found - contractc
"Kid's stuff"
See if next item in list is next main subject
expand
contract
if found - contract
"Vacation"l
If nothing after this...
expand
contract
if found - contract
react to a line item click
React here to a double click on a single line item "
Take Action!
addworld
Middle East"
Saddam
Not Good"
Here at home
Bart Simpson
Pretty Funny"
Bart's being assisted by Calvin
In the woods
Bambi"
Very hot
Let's hope mom made it
AddMail
Letter to mom"
Tell her about trip"
Jim's Bithday"
Need to get card
Birthday 8/22"
Wish List"
Santa Claus"
Not much hope"
It's a pretty long list"
DoNow
Dinner
My stomach
On Empty
No gummy bears!"
House on fire"
Fire Department"
Be sure to give them a call"
Gas the airplane
Hobbes
On Empty
Calvin and Hobbes Book
Hobbes
Still at store
Be sure to pick it up.
The Simpsons."
Nancy"
Need to tape it.
Comes on at 8!
Pony rides
No pony yet"
Feed the kids"
No food yet"
Gummy bears ok!"
Vacation
World Trip?"
Travel Agency"
Nice Trip"
The USA Tour?"
Travel Agency"
Less expensive
Still a lot of fun."
Dude ranch
Travel agency"
Which airlines
Travel Agency"
Undecided"
Avoid this one
MenuMouse_Click
MenuExit_Click
MenuExpand_Click
Double click an item to expand it. Double click it again to contract it.
MenuMR_Click
When you move the mouse over a column-separator line, the 'sizing' cursor appears. Use the mouse button indicated on the 'Mouse Resize' menu to size each column! Also, because MhIconTag has 'MDI' features, you can size the control itself.
CheckColumnWidth
This sub adjusts the width of an MhIconTag column
based on the contents of the CellText(WhichCol%) text.t
Note that the calculation assumes that the MhIconTago
control uses the same font as the Form.
This calculation ignores lines that have the MultiColumno