Bonsoir,
Désolé me revoilà avec mes tags !

Je delete sans pb des tags créés avec :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
# Clear Tags Input
my $bulb = $Wm->Photo( -file => $Image ); 
my $bouton_clearTagInput = $cadre_gestion->Button(
	-image    => $bulb,
	-command  => sub {
		if ($TexteInput) {
			$widget_input->tagDelete( 'g14' );
			$LabMessage = "Surbrillances dans Input effacées !";
		}
	},
);
La création se fait ainsi :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
sub Regex {
	if ( !$Regex ) {
		$LabRegex   = "Regex vide !";
		$LabMessage = "Regex vide !";
		print "\a\a";
		return;
	}
	$TexteInput = $widget_input->get( '1.0', 'end' );
	my $Pattern = $Regex;
	$Pattern =~ s/ /\\ /go;
	$LabRegex = $Pattern;
	my $i = 0;
	my @Array = ($TexteInput =~ m/(\b.{0,40}$Pattern.{0,40}\b)/gx);
	my $Nb = @Array;
	if ($Nb == 1){
		my @NewArray = split /$Pattern/, $TexteInput;
		my @ChainePref = ( $Array[0] =~ m/($Pattern)/gx);
		$widget_output->insert( 'end', $NewArray[0] );
		$widget_output->see( 'end' );
		$widget_output->update;
		$widget_output->tagAdd( 'MARK', 'end -1 chars' );
		my @Mark = $widget_output->tagRanges( 'MARK' );
		my ($SelA, $SelB) = split /\./, $Mark[0];
		$SelB = $SelB + length($ChainePref[0]);
		my $SelLast = $SelA.".".$SelB;
		
		print "MARK=$Mark[0] SELLAST=$SelLast\n";
		
		$widget_input->see( $Mark[0] );
		$widget_output->insert( 'end', $ChainePref[0], "g14");
		
		$widget_input->tagAdd( 'g14', $Mark[0], $SelLast);
		$widget_input->update;
		
		$widget_output->insert( 'end', $NewArray[1] );
		$LabRegex = $Pattern;
	} else {
		foreach my $Ligne ( @Array ) {
			$widget_output->insert( 'end', ++$i .": ".$Ligne."\n" );
		}
	}
}
Après avoir fait un delete des tags, si je relance la fonction sub Regex() les tags ne sont pas recréés
Je fais une trace qui me précise bien que je suis au même endroit.

Si je recharge le widget_input et que je relance sub Regex() même pb, pas de tag !

Y aurait-il une manip particulière à faire ?

MERCI d'avance !