| View previous topic :: View next topic |
| Author |
Message |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Apr 15, 2003 8:39 am Post subject: treeview |
|
|
Hi again, Bill.
One question. Can you add a feature to change the #haschilds for a parent later ? So I can add all elements and if I know that a entry
has childs I could change the status ? Or maybe it could
automatically be changed after a addchild.
This would be really great.
Bye, Fabian |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Apr 15, 2003 10:45 am Post subject: treeview |
|
|
Hi Bill,
maybe I found a bug.
I am using your tree-IDs like i wrote before.
But if I use an imagelist too, the id becomes a
part of the bitmap name:
%%parent = @treeview(add,TV1,%%name,0,0,1)
now %%parent is 1860416
but if I assigned an imagelist like in your example ini tree
%%parent becomes
ries.bmp
(the bitmap was address_categories.bmp)
Is this a bug ?
Bye, Fabian |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Apr 15, 2003 3:51 pm Post subject: |
|
|
Hi Fabian,
I've tried to duplicate your problem there, and I'm not seeing the same
results. I'm getting the correct item id back for whatever item I'm looking
at. And I did check it with the Ini Tree example all with the same result. So
I guess I'm at a loss once again. I'm not sure what to say. Would you care
to email me the portion of your code that's adding the items to the
treeview and the images to the image list? Maybe I can spot something
that you've missed.
As for the addition of a function to the treeview dll, I still don't quite
understand what you're asking of me. Maybe you could try to explain a little
more about what you are trying to accomplish. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Tue Apr 15, 2003 4:31 pm Post subject: treeview |
|
|
Hi Bill,
it sent you the code.
The feature I ment.
At this time I have to specify haschildren in your @treeview(add or addchild functions. So i have to write some lines of code to know if the item will have childs or not. If I simply set haschildren to all elements, all will have the +-Button, even if they have no children. It would be very cool, if I don't have to specify this, and the item add his buttons (+/-) when it gets his first child.
do you understand ?
Sorry, my english is not the best
Bye, Fabian |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Wed Apr 16, 2003 1:45 pm Post subject: treeview |
|
|
Hi,
why are the buttons looking so strange under win 98 ?
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Apr 16, 2003 5:56 pm Post subject: |
|
|
I've had no problems with the buttons on my Win98SE setup here. Here's
what a tree looks like on my system:
I've seen effects like that in Win98 before though, usually with the
Windows Explorer when switching screen color from say True color
down to 32k colors. Then it messes up the buttons on Windows
Explorer and will not be normal until I reboot under the same color
I've just switched to, or set it back to the original color setting without
rebooting.
But I've only encountered this on video cards that allowed True Color. I
tried to reproduce this on my current video card, but it only goes up to
32k color and will not give the ill effect.
I think I also ran into this when running dual monitors in 98, where the
main monitor is True Color and the second monitor is only 32k or 24k.
-Garrett |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Thu Apr 17, 2003 5:53 am Post subject: treeview |
|
|
Hi Garrett,
if I don't use manifest-Files in WinXP they are looking like in
win98:
With manifest all looks fine. |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Apr 17, 2003 7:24 pm Post subject: |
|
|
X-Tools, perhaps you can e-mail me the dialog code for that and I'll test in
in Windows XP Professional and we'll see if it's just a bug on your computer
or in the treeview code.
My e-mail is freezingfire@vdsworld.com .  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Apr 19, 2003 11:33 am Post subject: |
|
|
I've tested this for Fabian and I received the same resutls.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Sat Apr 19, 2003 11:54 am Post subject: treeview |
|
|
Hi,
thanks FreezingFire for testing it.
I think I found the problem.
If I set the bkcolor, linecolor and textcolor (white, black and black) the tree-element looks right on winxp - even without the manifest.
I will try it on win98 later.
One question to bill. The bitmaps are looking fine on the treeview.
Can you add this to the menu.dll too ? There the bitmaps in menuelements look a bit dirty on win98.
Have a nice weekend.
Bye, Fabian |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu Apr 24, 2003 1:57 am Post subject: |
|
|
Hey Bill...
First, I just want to tell you I love this extension. It is very useful and well done. I'm not sure if I found a bug or not, but I think so. Please see the code posted below. The problem I am having is with the @TREEVIEW(getNextChild) function. It seems it will return an item that is not a child of the specified item but a child of the parent of the specified item... the first brother item of the specified item, if you will. Clicking on any of the items that do not have any child items returns the correct result. But clicking on the Root Item will only return the first child item. Clicking on Child Item 1 will return SubChild Item 1, but then returns Child Item 2 repeatedly in an endless loop. Is it the function or is it my code? Any ideas anyone?
| Code: | EXTERNAL @PATH(%0)sstreevw.dll
rem *** create our dialog
DIALOG CREATE,SSTreeVw,-1,0,240,181,CLASS SSTreeVw
%%hwnd = @WINEXISTS(#SSTreeVw)
DIALOG SHOW
rem *** tack on our treeview to the dialog
TREEVIEW PARENT,%%hwnd
TREEVIEW CREATE,TREE1,11,8,224,162,hasButtons|hasLines|linesAtRoot|showSel|sunken,CLICK
rem *** populate the treeview with a few items
%%rootID = @TREEVIEW(ADD,TREE1,Root Item,0,0,1)
%%childID1 = @TREEVIEW(ADDCHILD,TREE1,%%rootID,Child Item 1,0,0,1)
%%subchildID11 = @TREEVIEW(ADDCHILD,TREE1,%%childID1,SubChild Item 1,0,0,0)
%%subchildID12 = @TREEVIEW(ADDCHILD,TREE1,%%childID1,SubChild Item 2,0,0,0)
%%subchildID13 = @TREEVIEW(ADDCHILD,TREE1,%%childID1,SubChild Item 3,0,0,0)
%%childID2 = @TREEVIEW(ADDCHILD,TREE1,%%rootID,Child Item 2,0,0,0)
%%childID3 = @TREEVIEW(ADDCHILD,TREE1,%%rootID,Child Item 3,0,0,0)
TREEVIEW EXPAND,TREE1,%%rootID
TREEVIEW EXPAND,TREE1,%%childID1
:eventloop
WAIT EVENT
%%event = @EVENT()
GOTO %%event
:close
EXIT
:TREE1CLICK
rem *** when the treeview is clicked, get the ID and text of the selected item
%%itemID = @TREEVIEW(getSelection,TREE1)
%%itemTEXT = @TREEVIEW(itemText,TREE1,%%itemID)
rem *** check if the selected item has any children
%%childID = @TREEVIEW(getChild,TREE1,%%itemID)
IF @EQUAL(%%childID,0)
INFO "This item has no children."
ELSE
rem *** if the selected item has children, get the text of the child item and display it
REPEAT
%%childTEXT = @TREEVIEW(itemText,TREE1,%%childID)
INFO %%childTEXT" is a child of "%%itemTEXT
rem *** get the ID for the next child item and loop around to get the text and display it
%%childID = @TREEVIEW(getNextChild,TREE1,%%itemID)
UNTIL @EQUAL(%%childID,0)
END
GOTO eventloop |
_________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Last edited by Hortalonus on Fri Apr 25, 2003 5:59 pm; edited 1 time in total |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu Apr 24, 2003 10:01 pm Post subject: |
|
|
Nothing at all from anyone? I know Bill is busy so for starters I would just like to know if anyone else is getting the same results with my code. _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Sat Apr 26, 2003 4:15 pm Post subject: |
|
|
I find it hard to believe that nobody has a minute and a half to copy my code and run it to see if they get the same results as I do. Hello? Someone... ANYONE! _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Sat Apr 26, 2003 4:29 pm Post subject: treeview |
|
|
Hi,
I get the same results like you.
Child Item2 and 3 are Childs of Child Item 1 in the nextchild function
Bye, Fabian |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Sat Apr 26, 2003 4:36 pm Post subject: |
|
|
So I'm not crazy... Thank you Fabian!
Perhaps it is my code then. I don't think so... I think I understand how to use the function. Maybe not... _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|