home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l408 / 2.img / EXAMPLES.EXE / EXAMPLES / MHICONTG / MHICONTG.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1992-10-29  |  34.2 KB  |  454 lines

  1. IconTag
  2. MhIconTag Demonstration
  3. Form1
  4. Label1
  5. 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.
  6. MhIconTag1
  7.     MhIconTag
  8. Courier
  9. This is an MhIconTag Control7
  10. Frame1
  11. Frame1
  12. Picture1
  13. wwwwwwwwwww
  14. wwwwwwwwwwww
  15. wwwwwwwwwww
  16. wwwwwwwwwww
  17. Picture1
  18. 33333
  19. 333330
  20. 3333333
  21. 33333330
  22. 333333333
  23. 93330
  24. Picture1
  25. Picture1
  26. Picture1
  27. Picture1
  28. wwwwwwwwwwww
  29. wwwwwwwwwwwwww
  30. DDDDDDDDDDDDD
  31. Fffffffffffff@w
  32. Fffffffffffff@w
  33. Fffffffffffff@w
  34. Fffffffffffff@w
  35. fff@w
  36. fff@w
  37. fff@w
  38. fff@w
  39. Fffffffffffff@
  40. DDDDDDDDDDDD@
  41. Picture1
  42. Picture1
  43. """""
  44. """"",
  45. """"",
  46. """""
  47. """""
  48. """""
  49. """"",
  50. |""""""
  51. |""""""
  52. """"""
  53. Picture1
  54. Picture1
  55. """"""""""""""""""""""""""""""""""""""""""
  56. """"""""""""""
  57. """"""""""""""
  58. """"""""""""""
  59. """"""""
  60. """"*
  61. """""""
  62. """"""
  63. """""
  64. """""
  65. Picture1
  66. """"""""""""""""""""""+
  67. """""""""
  68. )"""""""+
  69. """""")
  70. """"""
  71. """"""
  72. DDDDN
  73. DDDDDDD
  74. DDDDDDN
  75. DDDNDDDDDDDN
  76. Picture1
  77. wwwwwwwwwwwww
  78. wwwwwwww
  79. wwwwwwww
  80. wwwwwwww
  81. wwwwwwwwww
  82. wwwwwwwwww
  83. wwwwwwwwww
  84. Picture1
  85. Picture1
  86. Picture1
  87. wwwwwwp
  88. wwwwwwp
  89. wwwwwww
  90. wwwwwwwww
  91. wwwwwwwwp
  92. wwwwwwww{
  93. wwwwwwp
  94. wwwww{
  95. wwwww
  96. wwwww
  97. wwwwp
  98. wwwww
  99. wwwww
  100. wwwww
  101. wwwwp
  102. wwwwwp
  103. wwwww
  104. wwwwww
  105. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  106. Picture1
  107. Picture1
  108. Picture1
  109. Picture1
  110. Picture1
  111. Picture1
  112. aiaaaaaaii
  113. aaaaaaaaah
  114. wwwwx
  115. wwwwwx
  116. wwwwp
  117. wwwwwwwwwwwwwwp
  118. wwwwwwwwwwwwwwp
  119. Picture1
  120. "*b:#
  121. &"3272
  122. *"##332s3rw
  123. 3:3>#:/
  124. Picture1
  125. Picture1
  126. "" "" 
  127. " "" 
  128. """""
  129. """" 
  130. """""
  131. """"" 
  132. """""
  133. """""
  134. MenuFile
  135. &File
  136. MenuExit
  137. E&xit
  138. MenuHint
  139. &Hints
  140. MenuExpand
  141. &Expand/Contract
  142. MenuMR
  143. &Mouse Resize
  144. MenuMouseResize
  145. &Mouse Resize
  146.     MenuMouse
  147. &None
  148.     MenuMouse
  149. &Left
  150.     MenuMouse
  151. &Right
  152. MenuOptions
  153. &Options
  154. MenuOpt
  155. &MDI Features
  156. MenuOpt
  157. Control &Box
  158. MenuOpt
  159. M&inButton
  160. MenuOpt
  161. M&axButton
  162. MenuOpt
  163.     &Sizeable
  164. MhIconTag1_Click!
  165. Form_Clicka
  166.     Form_Load
  167. MhIconTag1
  168. LoadedPicture+
  169. TotalWidth
  170. Width
  171. ColumnWidth
  172. Columns
  173. ColumnTitlek
  174. ClearBuffer
  175. ColumnTextB
  176. ColumnhPicture
  177. ColumnTabIcon
  178. Picture1M
  179. picturex
  180. MhIconTag1_DblClick
  181. GetItem(
  182.     ListIndex
  183.     ColumnTab
  184. Whereat
  185. ScreenUpDate
  186. CellTextV
  187. CellPicture3
  188. CellTab
  189. earth_
  190. mailo
  191. dynamite6
  192. island
  193. Label1_Click2
  194. Picture1_Click
  195. Index
  196. AddMailBox
  197. addworldO
  198. AddMail"
  199. DoNow>
  200.     financial\
  201. Kidsw
  202. Vacationt
  203. crash
  204. bartU
  205. calvin
  206. carrier
  207. bambim
  208. woods
  209. saddam
  210. letter
  211. ballonsU
  212.     hamburger<
  213. hobbes
  214. gummy
  215. horsej
  216. hambuger
  217. world/
  218. Response
  219. CellMultiline
  220.     RowHeighty
  221. LineHeight
  222. FontSizeArr
  223.     FontIndex
  224. FontNameArr
  225. FontStrikeArr
  226. FontStrikeThruArr
  227. FontUnderLineArr
  228. FontUnderArr
  229. FontUnderStrikeArr
  230. FontItalicArr"
  231. FontBoldArr
  232.     BackColor
  233.     ForeColor
  234.     HighColorM
  235. CellBackColor^
  236. CellForeColor
  237. CellHighColor
  238.     Alignment
  239. CellAlignment
  240. paths
  241. icons
  242. bitmapsf
  243. totalk
  244.     SetColorsF
  245. Height
  246. DefaultLineHeight
  247. IconHeight
  248.     IconWidth#
  249. MainSubjects
  250. ColumnWidths
  251. Frame1_DragDropP
  252. Source
  253. FontName
  254. FontBold
  255. FontItalic
  256. FontSize
  257. ColWidth
  258. MenuMouse_Click
  259.     MenuMouse
  260.     ColResize
  261. Checked
  262. True$
  263. False
  264. ColumnResize
  265. MhIconT
  266.     ScaleMode1
  267. MenuExit_Click
  268.     MhIconTagE
  269. MenuExpand_Clickk
  270. MenuMR_Click
  271. sizing
  272. CheckColumnWidth0
  273. that5
  274. column
  275. WhichCol
  276. CellMultline!
  277. CaptionBar_Click
  278. MenuOptB
  279. CaptionBar
  280. ControlBox
  281.     MinButton
  282. SizeableR
  283. MenuOpt_Click
  284. TitleHeight
  285.     MaxButton
  286. MousePointer
  287. MenuMouseResize_Click
  288. MhXPixelsToTwips
  289. Pixels
  290. MhXTwipsToPixels
  291. Twips
  292. IconTag
  293. MhTrue
  294. MhFalse
  295.  Calculate based on TextWidthe
  296. mhen200.vbx    
  297. Form_Load
  298.  Set default font to same as form. This allows the
  299.  use of TextWidth to calculate column widths
  300. Load pictures you'll be using.
  301. We use a picture control array, but you can also use
  302. LoadPicture with .BMP or .ICO files.
  303.  Set default line height/width to size of Picture controlt
  304.  Experiment with fonts by un-remming lines. Note
  305.  that changing the font can affect TextWidth calculationst
  306.  when setting column sizes and title line height.
  307. MhIconTag1.FontNameArr(1) = "Courier"
  308. MhIconTag1.FontSizeArr(1) = 15
  309. MhIconTag1.FontUnderLineArr(1) = -1r
  310. MhIconTag1.FontStrikeThruArr(1) = -1
  311. MhIconTag1.FontBoldArr(1) = 05
  312. MhIconTag1.FontItalicArr(1) = -1
  313. Set up your titles
  314. Subject"
  315. Responsible person
  316. Current Status
  317. Remarks"
  318.  Set Column Info.f
  319.  You MUST set the column widths. Note that these will
  320.  be used as the MINIMUM widths. When we AddItemd
  321.  the main subjects, we also check to make sure
  322.  that the column is wide enough!
  323.  Add "M"'s to the string for aesthetics
  324.  Twips
  325.  Pixels
  326.  This is YOUR problem!
  327.  Set title line height according to text
  328. Now you can start adding items
  329.  Clear the line buffer
  330.  Which font to use for next line
  331. The subscripts are the column number (0 based)
  332.  Centeredc
  333.  If different from defaults
  334. World Issues
  335.  For next AddItem only, double the line height
  336. the subscripts are the column number (0 based)
  337. Mail box test of more than one line. We made this line taller than the others!
  338. Do now things"
  339. Kid's stuff"
  340. Vacation
  341. Configure menu options
  342.  Needed only if you don't want to use defaults
  343. MhIconTag1_DblClick
  344. find our positione
  345. reduce "flashing" by turning off update
  346. get this item 
  347. to see if we are expanded or not
  348.  "World Issues"
  349.  See if next item in list is next main subject
  350. expand
  351. contract
  352. if found - contract
  353.  Mail boxe
  354.  See if next item in list is next main subject
  355. expand
  356. contract
  357. if found - contract
  358.  "Do now things"
  359.  See if next item in list is next main subject
  360. expand
  361. contract
  362. if found - contractc
  363.  "Kid's stuff"
  364.  See if next item in list is next main subject
  365. expand
  366. contract
  367. if found - contract
  368.  "Vacation"l
  369.  If nothing after this... 
  370. expand
  371. contract
  372. if found - contract
  373. react to a line item click
  374. React here to a double click on a single line item "
  375. Take Action!
  376. addworld
  377. Middle East"
  378. Saddam
  379.  Not Good"
  380. Here at home
  381. Bart Simpson
  382.  Pretty Funny"
  383.  Bart's being assisted by Calvin
  384. In the woods
  385. Bambi"
  386. Very hot
  387. Let's hope mom made it
  388. AddMail
  389. Letter to mom"
  390. Tell her about trip"
  391. Jim's Bithday"
  392. Need to get card
  393. Birthday 8/22"
  394. Wish List"
  395. Santa Claus"
  396. Not much hope"
  397. It's a pretty long list"
  398. DoNow
  399. Dinner
  400. My stomach
  401. On Empty
  402. No gummy bears!"
  403. House on fire"
  404. Fire Department"
  405. Be sure to give them a call"
  406. Gas the airplane
  407. Hobbes
  408. On Empty
  409. Calvin and Hobbes Book
  410. Hobbes
  411. Still at store
  412. Be sure to pick it up.
  413. The Simpsons."
  414. Nancy"
  415. Need to tape it.
  416. Comes on at 8!
  417. Pony rides
  418. No pony yet"
  419. Feed the kids"
  420. No food yet"
  421. Gummy bears ok!"
  422. Vacation
  423. World Trip?"
  424. Travel Agency"
  425. Nice Trip"
  426. The USA Tour?"
  427. Travel Agency"
  428. Less expensive
  429. Still a lot of fun."
  430. Dude ranch
  431. Travel agency"
  432. Which airlines
  433. Travel Agency"
  434. Undecided"
  435. Avoid this one
  436. MenuMouse_Click
  437. MenuExit_Click
  438. MenuExpand_Click
  439.  Double click an item to expand it. Double click it again to contract it.
  440. MenuMR_Click
  441. 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.
  442. CheckColumnWidth
  443.  This sub adjusts the width of an MhIconTag column
  444.  based on the contents of the CellText(WhichCol%) text.t
  445.  Note that the calculation assumes that the MhIconTago
  446.  control uses the same font as the Form.
  447.  This calculation ignores lines that have the MultiColumno
  448.  property set to True.
  449.  Adjust if twips
  450.  Add IconWidth
  451. MenuOpt_Click
  452.  Toggle state of checkmark
  453.  Set propertys
  454.