TreeGadget Flags

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

TreeGadget Flags

Post by Paul »

Still waiting for a native PB flag that forces all branches of a TreeGadget to be open/displayed. :)
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Ruff translation of my C code that does what you need.

As I only have the demo, so you can tell me how close I wasn't :)

Code: Select all

;-----------------------------------------------------------------------------
; Expand TreeView
;-----------------------------------------------------------------------------
Procedure TreeViewExpandAll(gadget.l)
    hwndTV.l = GadgetID(gadget)  
    hRoot.l = SendMessage_(hwndTV, #TVM_GETNEXTITEM, #TVGN_ROOT, 0)  
    hItem.l = hRoot  
    Repeat
        SendMessage_(hwndTV, #TVM_EXPAND, #TVE_EXPAND, hItem)
        hItem = SendMessage_(hwndTV, #TVM_GETNEXTITEM, #TVGN_NEXTVISIBLE , hItem)  
    Until hItem = #NULL  
    SendMessage_(hwndTV, #TVM_ENSUREVISIBLE, 0, hRoot)
EndProcedure
;-----------------------------------------------------------------------------
; Collapse TreeView
;-----------------------------------------------------------------------------
Procedure TreeViewCollapseAll(gadget.l)
    hwndTV.l = GadgetID(gadget)  
    hRoot.l = SendMessage_(hwndTV, #TVM_GETNEXTITEM, #TVGN_ROOT, 0)  
    hItem.l = hRoot  
    Repeat
        SendMessage_(hwndTV, #TVM_EXPAND, #TVE_COLLAPSE, hItem)
        hItem = SendMessage_(hwndTV, #TVM_GETNEXTITEM, #TVGN_NEXTVISIBLE , hItem)  
    Until hItem = #NULL  
    SendMessage_(hwndTV, #TVM_ENSUREVISIBLE, 0, hRoot)
EndProcedure
ebs
Enthusiast
Enthusiast
Posts: 558
Joined: Fri Apr 25, 2003 11:08 pm

Post by ebs »

Inner,

Works! :D

Eric
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

quidquid Latine dictum sit altum videtur
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

I guess I should have used Bold on my message...

I asked for a "native PB flag", not a workaround.

How can your app be cross platform if you fill it full of Windows API calls? Right now one must loop through using SetGadgetState as a workaround to keep everything cross platform but that way is very slow ;(
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Hmm, TreeGadget is a "Windows only" Gadget. It's not supported on
any other Platform at all.

Noted on the bottom of the TreeGadget help page.

Sorry, you'll have to find a workaround around this whole Control to be
crossplatform compatible at the moment.

Timo
quidquid Latine dictum sit altum videtur
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

The whole point is that I do not want workarounds... I would like native support with PureBasic.

Regardless, this was posted for Fred. If everyone else wants to use workarounds that is fine, but this is my own little personal wish.
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Fare enough, just trying to help :)

(_wispers_) I think so too!! shhh
MeMyselfAndI
User
User
Posts: 10
Joined: Fri Apr 25, 2003 8:23 pm

Post by MeMyselfAndI »

freak wrote:Hmm, TreeGadget is a "Windows only" Gadget. It's not supported on any other Platform at all.
...

Timo
But this is a PureBasic related shortcoming not OS related.
On my LINUX box I can have Treeviews all over the place 8O

QUESTION:
Is PureBasic moving from a all purpose language to a Gamer language :?:
If yes, than the Linux version needs years from now to have the same GUI toolkit as the Windows version.
.
. Greetings
.
. from all three of us...
.
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

I don't think so, I think PB is just expanding and growing just like any language should.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

No it's not moving into a game langage, but into a multipurpose langage which is fairly different.
Post Reply