Add multiple properties to ListView1
Posted
#1
(In Topic #1127)
Enthusiast

Code (gambas)
- ListView1.Add(resultado["ID"], resultado["Name"], Picture[$sNoMonitor]).Foreground = Color.RGB(255, 0, 125)
- ' ListView1.Add(resultado["ID"], resultado["Name"], Picture[$sNoMonitor]).RichText = "<b style='color:rgb(255,0,125);'>" & resultado["Nombre"] & "</b>" (This works but I don't want to do it like this)
But I want to add .Font.Bold = True but how would it be done if possible.
Thank you.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Enthusiast

Note: (This solution does not work for the individual addition therefore it is not a valid solution. It is valid for all items)
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Guru

gambafeliz said
My solution:
Note: (This solution does not work for the individual addition therefore it is not a valid solution. It is valid for all items)
You're pretty close…
If you mix your 2 solutions together you will get this…
Posted
Enthusiast

But right on the line that I indicated, the Subroutine is exited. As if an error occurred. I don't know what's happening yet. But this gives an error, when I do what you tell me, in fact I already tried it but since it failed me, I have left it, because it is impossible for the moment.
Note: Error.Code = 13 = Null object
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
Posted
Guru

gambafeliz said
Thank you very much for your always effort. Thank you.
But right on the line that I indicated, the Subroutine is exited. As if an error occurred. I don't know what's happening yet. But this gives an error, when I do what you tell me, in fact I already tried it but since it failed me, I have left it, because it is impossible for the moment.
Note: Error.Code = 13 = Null object
You are correct, the .Font property does not seem to be initialized , so accessing it's .Bold property throws an error.
So this works…
Posted
Enthusiast

You do know about Gambas programming.
That's if I painted the wall in my living room, maybe I wouldn't call you.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
1 guest and 0 members have just viewed this.



