Get TreeGadget full path suggestion

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Little John
Addict
Addict
Posts: 4778
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Get TreeGadget full path suggestion

Post by Little John »

Perhaps for instance #LF$ is a good choice as separator, since this character is rather unlikely to appear in an item of the TreeGadget().
BarryG
Addict
Addict
Posts: 4130
Joined: Thu Apr 18, 2019 8:17 am

Re: Get TreeGadget full path suggestion

Post by BarryG »

Fred wrote: Sun Jun 18, 2023 7:12 pmWhich separator should be used in the sting ?
BarryG wrote: Sun Jun 18, 2023 1:55 ama new command could use #LF$ to be consistent with other commands
So it's similar to the separate fields of a ListIconGadget(). Then the user can do "ReplaceString(string$,#LF$,custom$)" if they like.
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Get TreeGadget full path suggestion

Post by idle »

It would be good to have a custom separator.
Axolotl
Addict
Addict
Posts: 802
Joined: Wed Dec 31, 2008 3:36 pm

Re: Get TreeGadget full path suggestion

Post by Axolotl »

Why not implement the well known procedures together with a new constant like

Code: Select all

; NEW 
; #PB_Tree_Separator 	.. #LS (10)   (because Value is Int ) 
; 
; GetGadgetAttribute(Gadget, Attribute) 
; SetGadgetAttribute(Gadget, Attribute, Value)

; possible usage 
SetGadgetAttribute(#GADGET_Tree, #PB_Tree_Separator, #LS) ; or '|' or $205E ...
 
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: Get TreeGadget full path suggestion

Post by AZJIO »

#PS$ #LS
#PS$ if #PB_Tree_Separator is present

AutoIt3 has global options without being tied to a gadget. For example Opt(#PB_Tree_Separator, #PS)
Post Reply