Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
COLUMNVIEW - Use datas

The Column View


001.jpg


Today, wemake a little program to learn to use a columnview.
Create a form with a columnview and Two buttons.
When we clic on button1, we put some data in column and when we clic on the buttton2 ,we display a message box with the current column selection .
start to  with command :

ajust number of columns :

columnview1.columns.count = 4

ajust "width " of column 1 :

columnview1.columns[0].width = 200
Give name to column1 :

columnview1.columns[0].text = "colonne 1"

Do this for the 4 columns :

code1.jpg

double clic on  Button1 :

code2.jpg
double clic on button2

code3.jpg
our application is ended, look at the result .

002.jpg


Delete  a line
(Thanks to Jack and linuxOs for this information)
  To delete a columnview line, if you know the key (number of the line) write this code :

IF columnview1.exist[numkey] THEN
columnview1.remove(numkey)
END if

Or another solution, select the line with click and push DEL key :

PUBLIC SUB columnview_keypress()
IF key.code = key.delete and columnview.count <> 0 THEN
IF message.question("etes-vous sur de vouloir supprimer cette ligne ?", "oui", "non") = 1 THEN
columnview.current.delete
ENDif
ENDif
END

Sources to download  HERE
regards

Creation date : 28/03/2009 @ 22:35
Last update : 27/01/2012 @ 22:01
Category : COLUMNVIEW
Page read 7842 times


Print the article Print the article


react.gifReactions to this article


Reaction #5 

by Jack 04/05/2011 @ 18:53


Si la propriété du columnview est mise à multiple, pour supprimer plusieurs lignes séléctionnées on peut utiliser le code suivant (a tester car écrit de tête)

PUBLIC SUB Suppr_Lignes()
Columnview.movefirst()
Repeat
If Columnview.selected = true then
  Columnview.Current.Delete
until Columnview.movenext()

end


Reaction #4 

by masterrsi 26/04/2011 @ 19:26

merci pour ce beau tuto !
Mais j'ai une question comment peux-je supprimer par exemple 2 lignes identique dans un columnview
Merci d'avance

Reaction #3 

by guyvdv 07/02/2011 @ 10:04

un des meilleur sites pour un debutants en gambas (72 ans)
One of the best sites for a newbie
thanks to all
guy van der velden

Reaction #2 

by Pierre37 02/10/2009 @ 17:56

Très bon article mai qui passe sous silence la sélection. Or si je sais comment récupérer l'élément sélectionné (propriété Current) en mode single, je n'arrive pas à récupérer les éléments sélectionnés en mode multiple.
A quoi peut bien servir la propriété Mode?

Cordialement

Reaction #1 

by Johnno 20/09/2009 @ 06:40

Being new to Gambas and Linux programming in general, I found this information to be very helpful. Thanks a lot for this article 

QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitors online

ARCHIVES GAMBAS 1/2
^ Top ^