Bug 149797 - It is not possible to change highlight color in listbox
Summary: It is not possible to change highlight color in listbox
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Ilhan Yesil
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-01 06:11 UTC by Ilhan Yesil
Modified: 2022-10-09 18:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Demonstates how the highlight color should be set (12.22 KB, application/vnd.oasis.opendocument.text)
2022-07-01 06:13 UTC, Ilhan Yesil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilhan Yesil 2022-07-01 06:11:58 UTC
Description:
The selected item in a listbox is allways shown with the color blue. It should be possible to define other highlight colors.

Steps to Reproduce:
Attached is a document, where the macro function SetHighlightColor demontrates how I would expect a working code looks like. Pressing the button "Demonstrate HighlightColor" will show an error dialog, as the attribute is not implemented yet.

Actual Results:
Error dialog.

Expected Results:
Listbox is set with a different highlight (selection) color.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.8.0.0+ (x64)
Build-ID: 2277
CPU-Threads: 12; BS: Windows 10.0 Build 19043; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL
Comment 1 Ilhan Yesil 2022-07-01 06:13:47 UTC
Created attachment 181049 [details]
Demonstates how the highlight color should be set
Comment 2 Ilhan Yesil 2022-07-01 06:14:08 UTC
Self confirming according to https://wiki.documentfoundation.org/QA/Guidelines_for_public_and_private_sector_deployments. Issue has originally been reported by another user in our internal issue tracker.
Comment 3 Rafael Lima 2022-07-21 19:31:48 UTC
Hi Ilhan, it is interesting to come across this enhancement request. I think this would give macro/extension developers more flexibility when developing UI elements in dialogs.

Controls in Basic dialogs are very simple in terms of available properties.

Just yesterday I was trying to change some text properties in the items of a list box (f.i. make some of the items bold and others not). However, that is not possible.

Anyways, +1 for this idea.

As for your patch, wouldn't you need to update the IDL files? for instance, the Listbox Model file is in:

https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/awt/UnoControlListBoxModel.idl?r=5687eba4
Comment 4 Ilhan Yesil 2022-07-27 08:11:03 UTC
Hi Rafael, thank you for your comment. I needed this for an extension.

Yes, it seems that I've also to update the according idl files.
Comment 5 Commit Notification 2022-09-19 11:30:46 UTC
Ilhan Yesil committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ba164651bbdbde1b8a4ae3495b845ebc13b01bad

tdf#149797 Change highlight background color in some controls

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Buovjaga 2022-10-09 18:47:35 UTC
Seems like this can be changed to fixed.