Need help with hierarchical listbox (OpenInsight Specific)
At 14 NOV 1997 09:02:03AM Oystein Reigem wrote:
I'd like some help with an hierarchical listbox.
What is special about my case is that the
hierarchy is very big. Therefore I want to have
*just* the expanded part of the hierarchy in
the LIST property, not the whole hierarchy.
(I don't expect the users to expand more than
a little part of the hierarchy.)
My first thought was to write my own DBLCLK
user event handler, where I change e.g the LIST
property myself. But it seems that at the time
when my handler runs, the system has already done
its thing, e.g if I doubleclick on an expanded
node it's already collapsed when my handler
gets its turn.
Surely I can think of ways to get around the
problem, but I'd first like to know if it can
be solved in a more "proper" way. So is there
a way I can replace all or more of the default
processing with my own programming?
- Oystein -
At 14 NOV 1997 11:30AM Cameron Revelation wrote:
Oystein,
So is there a way I can replace all or more of the default processing with my own programming?
Sure there is. Do your processing on double-click … if there isn't any data for the system to show already then you can fill it in on double-click.
Cameron Purdy
info@revelation.com
At 17 NOV 1997 04:57AM Oystein Reigem wrote:
Cameron,
Sure there is. Do your processing on double-click
But that's what I've tried already!
I made a DBLCLK user event.
The problem is that the user event code
doesn't replace the default processing.
The default processing is already done
by the time my event code gets it turn.
Or do you mean something else completely?
Let me try again and be as specific as I can:
The list box contains information on
physical locations in an archive.
At one time the content may be e.g
Main building Room A North wall West wall Shelf 1 Shelf 2 Shelf 3 Shelf 4 Room B Room C New building ...etc...Here the user sees a mixture of expanded
and collapsed nodes. But as I said in my
first posting, the hierarchy is so big that
I cannot allow the list box control to have
the complete hierarchy in its LIST property.
So in the LIST property is only what the
user sees (except he might have to scroll
to see all of it).
Assume the user doubleclicks on the "West wall"
line. Now that node should collapse so that the
"Shelf 1-4" lines disappear.
Since I want to handle the LIST property
myself, I want the DBLCLK user event handler
to remove the lines - not the default processing.
But by the time my DBLCLK user event handler
kicks in the default processing has already
removed the lines.
- Oystein -
At 17 NOV 1997 08:04AM Oystein Reigem wrote:
Cameron,
Seems I've confused LIST and LIST_EX.
It's of course LIST_EX that I need to manipulate.
But that doesn't change anything.
And why is it that I cannot see the LIST_EX
and SELECT_EX properties in the Debugger
View Properties window? (I use OI 3.3.)
While waiting for help I try to work around
the problem, but it'd certainly be easier if
I could see how the properties change.
- Oystein -
At 18 NOV 1997 03:09PM Aaron Kaplan wrote:
When I work with hierarchical list boxes, I generally fill in all the data from the start, so I don't have to worry about manipulating what's underneath. It's a constant. If data does change, I'll generally place it in another list box to the side.
However, that's not really an answer, is it. So, without any further waste of bandwidth, here's something, though you still might not be happy with it.
In the create event of a window, I placed in
unUsed=send_message( parentWin : '.LB_REPOS_TYPES','QUALIFY_EVENT', 514, 1)The WINMSG event was just
unUsed=set_property( ctrlEntId1,'.', 'TEXT', oconv( time(), 'MTHS'))I did this so I could tell what was happening. All it's doing is placing the current time in the title bar, just to prove the event was really fired.
So, this activated the mousebutton up event for the control. Logically, you can figure that when the button is raised, a click's occurred. Not always 100% accurate, for sure, but it does do sorta what you want.
I spent a good hour I guess testing all sorts of messages, but none really responded in the way you seem to want. All the various windows messages that would effect, don't get called until after the effect has taken place.
You could keep plugging in various messages to capture until you find the one you want. However, I still think it might be better to load the list all at once and display whatever needs to be changed someplace else.
Just my opinion though.
apk@sprezzatura.com
At 18 NOV 1997 03:12PM Aaron Kaplan wrote:
It's not in the list, but if you go to view/properties, you can enter LIST_EX (or any other properties that doesn't appear in the list) and it will display for you.
apk@sprezzatura.com
At 19 NOV 1997 04:21AM Aaron Kaplan wrote:
I was thinking about this on the walk home and I was wondering if my test wasn't the most accurate. Part of my little tests were jumping into the debugger, so windows might be multi-tasking itself into displaying the listbox and trying to jump to the debugger at the same time. On the other hand, it might not. Just a word to the wise.
apk@sprezzatura.com
At 20 NOV 1997 09:44AM Oystein Reigem wrote:
Aaron,
You didn't sound too optimistic about replacing default processing in your reply, so I stuck to my original plan, and I'm happy to say I finally found out how to "collaborate" with the default processing.
There is one remaining problem, though. See my "How set bitmaps for a hierarchical list box programmatically?" posting.
(Your way to test various messages can come in handy later. I'm not very familiar with Windows programming, but with some help from the last issue of SENL (Andrew about QUALIFY_EVENT), I managed to get it to work and understand what went on. But to use it for real I need an overview of messages - for each of the Windows versions our customers use. I've searched my MSDN Library CDs, but there I find only message names (e.g WM_LBUTTONUP) and not the numbers.)
- Oystein -
At 20 NOV 1997 09:51AM Oystein Reigem wrote:
Aaron,
You didn't sound too optimistic about replacing default processing in your reply, so I stuck to my original plan, and I'm happy to say I finally found out how to "collaborate" with the default processing.
There is one remaining problem, though. See my "How set bitmaps for a hierarchical list box programmatically?" posting.
(Your way to test various messages can come in handy later. I'm not very familiar with Windows programming, but with some help from the last issue of SENL (Andrew about QUALIFY_EVENT), I managed to get it to work and understand what went on. But to use it for real I need an overview of messages - for each of the Windows versions our customers use. I've searched my MSDN Library CDs, but there I find only message names (e.g WM_LBUTTONUP) and not the numbers.)
- Oystein -
At 20 NOV 1997 10:05AM Carl Pates Sprezzatura wrote:
Hi Oystein,
]]I've searched my MSDN Library CDs, but there I find only message names (e.g WM_LBUTTONUP) and not the numbers.))
Carl
Sprezzatura Ltd
At 21 NOV 1997 03:54AM Oystein Reigem wrote:
Carl,
]
I thought so. It's just that the rest of the MSDN CDs are on a different floor…
)]]
Thanks for the warning!
- Oystein -
At 21 NOV 1997 07:49AM Oystein Reigem wrote:
Aaron,
]
How? It may be right under my nose but I still cannot see it.
]
- Oystein -
At 22 NOV 1997 11:14AM Aaron Kaplan wrote:
It's under the Variables menu entry in the debugger, not under your nose. You were looking in the wrong place.
apk@sprezzatura.com
At 24 NOV 1997 04:59AM Syntax? wrote:
And the syntax, please…
- Oystein -
At 24 NOV 1997 11:18AM DSig (SigSolutions) wrote:
Oystein,
pmfji ..
In the debugger.
Menu - Variables
Insepect PropertiesHere you define the Window, Control and Property you wish to
view. Enter LIST_EX and it should show the value.
Of course it is not as easy as looking at all the props at the
same time through the view .. I have asked to get this fixed before
but ..
If this is not what you are looking for .. could you explain it
to me as I must not have understood.
dsig
David Tod Sigafoos ~ SigSolutions=User Systems .. Not Dogma
dsig@teleport.com voice: 503-630-8080 cis:70302,77
NOTICE FOR RTI FORUMS: The message above is an answer to a user request and should
be taken as personal opinion only.
Although care was taken to not hurt anyones feelings or impugn the quality of any product, support or idea IF there is an
exception taken please note in detail the offending portion of the note and email me. I will take all notes under advisement.
At 28 NOV 1997 03:41AM Oystein Reigem wrote:
David,
I feel very silly because I used "Inspect Variables"
instead of "Inspect Properties". I have never used
that second menu choice, just the first one.
And now I just went right for the first one again.
But for some reason I *still* cannot inspect LIST_EX.
I can inspect existing properties like LIST.
I can even inspect non-existing properties like XXX
(i.e there is of course no value, but the Inspect/Modify window shows).
But when I try LIST_EX, no Inspect/Modify window appears!!!
I run OI 3.3.
- Oystein -