TreeGadget() & Ugly black & red checkered border

Windows specific forum
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

Working with TreeGadget() under Windows 10 w/ Latest PB stable release.

The selected item in the list gets an ugly black & red checkered border. If I switch to another screen and come back to it, all is normal, and I can select around and It'll be good.

Image Image
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
acreis
Enthusiast
Enthusiast
Posts: 204
Joined: Fri Jun 01, 2012 12:20 am

Re: TreeGadget() & Ugly black & red checkered border

Post by acreis »

I coudnt reproduce the issue here.
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

Nothing fancy for code, simply using the PB Help TreeGadget() sample code. Using default Windows 10 Theme.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
acreis
Enthusiast
Enthusiast
Posts: 204
Joined: Fri Jun 01, 2012 12:20 am

Re: TreeGadget() & Ugly black & red checkered border

Post by acreis »

Great!

Black and dark yellow checkered border here!
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

lol
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 544
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: TreeGadget() & Ugly black & red checkered border

Post by bbanelli »

Obviously Windows 10 theme driven feature. When you return focus to a window and pres "Ctrl", same frame/border appears.

Image

Code: Select all

If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  tree = CreateWindowEx_(#Null, #WC_TREEVIEW, "Tree View", #WS_VISIBLE|#WS_BORDER|#WS_CHILDWINDOW|#TVS_HASLINES,10, 10, 160, 160, WindowID(0), #Null, GetModuleHandle_(0), #Null)
  TreeGadget(1, 180, 10, 160, 160, #PB_Tree_NoLines)
  For i = 1 To 5
    NodeText.s = "Item " + Str(i)
    tvi.TV_INSERTSTRUCT\hParent = hItemParent
    tvi.TV_INSERTSTRUCT\hInsertAfter = #TVI_LAST
    tvi.TV_INSERTSTRUCT\Item\Mask = #TVIF_TEXT 
    tvi.TV_INSERTSTRUCT\Item\pszText = @NodeText
    tvi.TV_INSERTSTRUCT\Item\cchTextMax = Len(NodeText)  
    SendMessage_(tree, #TVM_INSERTITEM, #Null, @tvi)
    AddGadgetItem (1, -1, "Item " + Str(i), #Null, #Null)
  Next
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

I've noticed the reappearance earlier when I was pressing ALT.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

I wonder why other applications using the same class doesn't suffer from this then. If it is truly new style in Windows 10 ... which I find it really difficult to believe. Windows Device Manager and other apps using same class .. doesn't suffer from this anomaly.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 544
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: TreeGadget() & Ugly black & red checkered border

Post by bbanelli »

Well, I've called native WinAPI and same thing happens.

Funny, though, if you try access "Class" tab in WinSpy++ with any PB application in Windows 10 (including PB IDE), it crushes spied application immediately.
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4953
Joined: Sun Apr 12, 2009 6:27 am

Re: TreeGadget() & Ugly black & red checkered border

Post by RASHAD »

No,no black border with Win API
Only with PB
Egypt my love
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4953
Joined: Sun Apr 12, 2009 6:27 am

Re: TreeGadget() & Ugly black & red checkered border

Post by RASHAD »

Strange behavior
If the TreeGadget followed by even a dummy ButtonGadget it looks fine

Code: Select all

  If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    TreeGadget(0, 10, 10, 160, 160)                                         ; TreeGadget standard
    TreeGadget(1, 180, 10, 160, 160, #PB_Tree_CheckBoxes | #PB_Tree_NoLines)  ; TreeGadget with Checkboxes + NoLines
    For ID = 0 To 1
      For a = 0 To 10
        AddGadgetItem (ID, -1, "Normal Item "+Str(a), 0, 0) ; if you want to add an image, use
        AddGadgetItem (ID, -1, "Node "+Str(a), 0, 0)        ; ImageID(x) as 4th parameter
        AddGadgetItem(ID, -1, "Sub-Item 1", 0, 1)    ; These are on the 1st sublevel
        AddGadgetItem(ID, -1, "Sub-Item 2", 0, 1)
        AddGadgetItem(ID, -1, "Sub-Item 3", 0, 1)
        AddGadgetItem(ID, -1, "Sub-Item 4", 0, 1)
        AddGadgetItem (ID, -1, "File "+Str(a), 0, 0) ; sublevel 0 again
      Next
    Next
  ButtonGadget(2,0,0,0,0,"Test 2")
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
Egypt my love
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

Looks fine until you press certain keys.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

the filling of the backcolor of the selected control is incomplete. Also ListViewGadget also effected, however with very slight difference.

Image Image
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: TreeGadget() & Ugly black & red checkered border

Post by Fred »

Seems to work as expected here, can anybody else confirm ?
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: TreeGadget() & Ugly black & red checkered border

Post by Thunder93 »

Using the TreeGadget() example code with PB 6.02LTS under Windows 10 22H2 w/Latest patches, I'm still experiencing the same thing.

Image
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Post Reply