The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
ToolTips in a Treeview?
Posted: 11 Jun 07 8:46 AM
|
Has anyone done this yet with SLX? All the vb6 examples I've found use an API and I'm having a hard time imagining that's the way SLX created their custom control...
|
|
|
|
Re: ToolTips in a Treeview?
Posted: 12 Jul 07 9:23 AM
|
The VB6 API trick involves the following:
Dim hwndTips As Long hwndTips = SendMessage(tv.hwnd, TVM_GETTOOLTIPS, 0&, ByVal 0&) SendMessage hwndTips, TTM_ACTIVATE, 0&, ByVal 0&
Which effectively disables them. If SLX implemented a microsoft treeview - this should still work, however, I understand that SLX is actually written in DELPHI Pascal, so the controls might be totally "HomeGrown" and have their "API" or means of controlling them.
I would take a stab at seeing how it done in DELPHI or the opensource FreePascal Lazarus project - which is a delphi clone more or less but runs on muliple operating systems. The source is available and may shed some light on how the treeview is used under the "hood" in SLX. http://lazarus.freepascal.org
(Fixed Link - I had .com - which is a parked domain - My Apologies)
Jason P Sage |
|
|
|
Re: ToolTips in a Treeview?
Posted: 12 Jul 07 10:47 AM
|
I found the ms API trick, but didn't even try it as I haven't seen API's used in SLX before. (I thought I'd have to build a component outside and reference it - and that was more work then I could justify for the solution I was trying to engineer.)
I will however take a peek at the Delphi stuff. The weblink is wrong, btw - better have your antivirus up to date if you visit that one...
Here's the 'good' link: http://www.lazarus.freepascal.org/ |
|
|
|
Re: ToolTips in a Treeview?
Posted: 12 Jul 07 1:10 PM
|
One thing to keep in mind is that a declared API, such as SendMessage isn't usable from VBScript. VBScript does not support the "declare" statements needed to use a std DLL function.
So that leaves you with two options:
1) Wrap it in a COM exposed DLL and call that 2) Add the code in a Legacy basic plugin to make the API call (legacy basic *can* do the needed declares and std DLL function calls)
Make sense? |
|
|
|
Re: ToolTips in a Treeview?
Posted: 12 Jul 07 1:35 PM
|
Yeah - the COM wrapped DLL was my original thought too (I avoid legacy if at all possible, mostly because I hate it but mainly because it is going away - eventually).
But if that was even going to work with the SLX control was a complete mystery - and again, more work that the enhancement was worth at the time (my alternate solution ultimately got pulls before release anyway - the business couldn't create the supporting data).
Thanks for the direction!! |
|
|
|
Re: ToolTips in a Treeview?
Posted: 12 Jul 07 1:38 PM
|
It might even be easier to go with a commercial 3rd party ActiveX tree control that has that already built in. |
|
|
|