Jump to content

Recommended Posts

Posted

Hi.

Im currently writing a small script with a simpel GUI. I have used GUICtrlCreateList() function to create several lists of users. However in some cases i would like the color of some users to become red and sometimes blue. Ive searched the forms and i have found tons of info regarding the GUICtrlCreateListView function. But Im using the GUICtrlCreateList function. Can the same process be applied for items in GUICtrlCreateList aswell? And if so, how?

Thank you.

Posted

Why does it have to be a list?

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

Tjalve,

If you searched the forums you might have come across this which shows how you might create an individually coloured "list" of items - you cannot do it with a simple List control. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

I checked the links but i cant make it do what i want.

I use a listbox becuase I have a list fo users. In the GUI. im supposed to select a specifik user and then go to the next setting. Richtext seems to create a textarea whith text that can be selected. I want a list of items that can be selected.

Edited by Tjalve
  • Moderators
Posted

Tjalve,

The second example in the link I gave you allows items to be selected, as well as coloured. :)

M23

P.S. Nothing against Lars' excellent example, of course. ;)

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 12/20/2012 at 12:19 PM, 'LarsJ said:

Posted Image

You can have colored items in an ownerdrawn listbox.

ListBox.au3

Lars.

This looks Awsome! Thanx man. But I seem to lack the APIConstants.au3 file. Is it part of a UDF?
  • Moderators
Posted

Tjalve,

Replace it with WindowsConstants.au3 and the script still works. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 12/20/2012 at 1:39 PM, 'Melba23 said:

Tjalve,

Replace it with WindowsConstants.au3 and the script still works. :)

M23

Yes it does! Thanks alot. now i just need to understand how to create my own list :P

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...