[Gambas-user] Combobox, old Auto-list-width-behaviour, I'm confused

ub2 at gmx.ch ub2 at gmx.ch
Fri May 27 17:55:43 CEST 2022


Dear Benoit


Thanks a lot for your info. Unfortunately I'm confused:

- There won't be a kind of
-- cbo.ListAutoWidthAdjust = true/false
-- cbo.ListWidth = [0...]
-- cbo...?
property in future. Right ?

- GianLuigi's todays recommendation neither (27.05.22 um 11:58) ?
   ...
   "Benoit I think you should change W -= Style.FrameWidth * 2 to 
something like W = gvwPopup.Columns[0].Width + ... "
   ...

- When Xubuntu switches to Wayland following workaround will fail:

Public Sub Cbo_ListAutoFitSize_Enter()
     FrmCboListAkt.Form_Open(Cbo_ListAutoFitSize)
End

And then FrmCboListAkt acting like a Popup List:
- Placing FrmCboListAkt itself "just underneath" Cbo_ListAutoFitSize
- Showing Cbo_ListAutoFitSize.List in a tableview
- detecting user selected line
- then sending Column0 of selected line back to Cbo_ListAutoFitSize.text
- and then FrmCboListAk.close


So, what do you recommend me to do with cbo's representing for example:
a) "a user selected option" like:
Opt	Explanation:			Further Info:
1	User description of Option 1	...
2	User description of Option 2	...
3	User description of Option 3	...
...

	or

b) "a user choice of Backup-Paths":
Opt:	Backup-Path:			FreeGB
1	/.../.../(long Path to)/...	123
2	URL.....			224
3	/.../.../...			0
.	...				.


Please apologize if I got sth completely wrong.

Thank you for your patience. Have a nice WE.
(I'll check email tomorrow and Monday)

ub2

Am 27.05.22 um 15:51 schrieb Benoit Minisini:
> Le 27/05/2022 à 10:14, ub2 at gmx.ch a écrit :
>> Dear Gambas Cracks
>>
...
>>
>> With older Combobox-Versions (?qt4?):
>> -The List blew up in width to fit to widest list entry,
>> -- if required even bigger than Form.width !
>> -- Combobox itself remained in place and size.
>>
>>
>> With Gambas 3.17.2, gb.qt5, Xub20.04LTS
>> - The combobox."Listwidth" remains at combobox.w
>> - The list entries are stripped down to fit into
>> -- 1  s...hgsk
>> -- 2  d...f sd
>> -- 3  a...sdhb
>> -- ...
>> With longer entries Combobox becomes useless.
>>
>>
...
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 
> The old behaviour has been mimic in the last commit.
> 
> Beware that it should not work on Wayland, as Wayland does not allow to 
> position a window (the combo popup in that case) where you want on the 
> screen.
> 
> Regards,
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220527/7d29b5cd/attachment.sig>


More information about the User mailing list