fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.1k stars 1.4k forks source link

container.NewScroll does not support horizontal scroll for widget tree object #4775

Open dliu2223 opened 7 months ago

dliu2223 commented 7 months ago

Checklist

Describe the bug

Tree widget has vertical scroll when tree extends beyond wrapping container vertically, but not horizontally. Tried wrapping the tree using container.NewScroll, with ScrollBoth direction, but the horizontal scroll bar only shows up when the window is shrinked to a small size, the scroll bar does not scroll to the entire width of the container window.

How to reproduce

Use fyne_demo/tutorial/collection.go as example, changed the makeTreeTab to return container.NewScroll(tree)

Screenshots

No response

Example code

container.NewScroll(tree)

Fyne version

2.4.4

Go compiler version

go version go1.21.1 darwin/amd64

Operating system and version

sonoma 14.4.1

Additional Information

No response

dliu2223 commented 7 months ago

Attached screen shot

andydotxyz commented 7 months ago

Attached screen shot

There is no screenshot...

andydotxyz commented 7 months ago

I wonder if this is essentially the same as #4060 ?

dliu2223 commented 7 months ago

You can see the bottom has no scroll bar, thanks

On Wed, Apr 10, 2024 at 1:28 AM Andy Williams @.***> wrote:

Attached screen shot

There is no screenshot...

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_fyne-2Dio_fyne_issues_4775-23issuecomment-2D2046896232&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=muzbAtqPojeg0y31fUcbZA_FaWC9exft3yCCrqM_26s&m=qcPU0SvVJ6IZ8NoFxDgrzUwlffOmFDQL8uX8WKU5Sn_YMJ9rAJswlv3aIS0qinYx&s=ip8scTlE5cRx5ubFu5NQKpywRo99wWke4vxlmHg-zOk&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AEN56CKD2TY5HWXVQBZBCCDY4TZ3BAVCNFSM6AAAAABF67SGUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBWHA4TMMRTGI&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=muzbAtqPojeg0y31fUcbZA_FaWC9exft3yCCrqM_26s&m=qcPU0SvVJ6IZ8NoFxDgrzUwlffOmFDQL8uX8WKU5Sn_YMJ9rAJswlv3aIS0qinYx&s=drn5rEylYCcr09StlvECOqC-COwVsmxb3JNcFJpfy6o&e= . You are receiving this because you authored the thread.Message ID: @.***>

-- David Liu

dliu2223 commented 7 months ago

Hi Andy,

I looked at 4060 and tried to use NewHBox for horizontal scroll, I did get a scroll bar, but limited to the minsize of the tree due to HBox layout, I tried to set the tree minsize to larger but it does not work for HBox, see attached. Any suggestions?

On Wed, Apr 10, 2024 at 1:29 AM Andy Williams @.***> wrote:

I wonder if this is essentially the same as #4060 https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_fyne-2Dio_fyne_issues_4060&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=muzbAtqPojeg0y31fUcbZA_FaWC9exft3yCCrqM_26s&m=1muWV1BybyjqQrcCOhWIgD0IqsRf-sfvAyS6uSUJng1kPnLhkaOrNKqAbRPRiSNO&s=2Dn8-bzoGuM9F6xW9_AXjQDyllox1PyBMBBHwi8_MIQ&e= ?

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_fyne-2Dio_fyne_issues_4775-23issuecomment-2D2046897814&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=muzbAtqPojeg0y31fUcbZA_FaWC9exft3yCCrqM_26s&m=1muWV1BybyjqQrcCOhWIgD0IqsRf-sfvAyS6uSUJng1kPnLhkaOrNKqAbRPRiSNO&s=2XqEBRlQdxnS-5_0AxzeHNZQA3_MEG5_EOptiHqJNHk&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AEN56CNNQ7Y6ZRX27BXY7OLY4TZ6PAVCNFSM6AAAAABF67SGUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBWHA4TOOBRGQ&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=muzbAtqPojeg0y31fUcbZA_FaWC9exft3yCCrqM_26s&m=1muWV1BybyjqQrcCOhWIgD0IqsRf-sfvAyS6uSUJng1kPnLhkaOrNKqAbRPRiSNO&s=EwTsFUJWUG8_rwhNqTpy64V8Ae_-QeDdfMNwg0e1GMk&e= . You are receiving this because you authored the thread.Message ID: @.***>

-- David Liu