J'utilise la fonction _GUICtrlCreateGroup() pour avoir une transparence au niveau du texte du groupe. Jusque là tout est OK.
Mon problème est que je modifie les textes de mon appli (français, anglais, allemand). J'arrive a tous les modifier sauf celui de mon groupe.
Si quelqu'un à une idée..
Ci joint mon code et pièces jointes... http://www.cjoint.com/c/EFmkUZ15Q3I
Merci par avance
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StringSize.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
Global $IcoPathFR, $IcoPathEN, $IcoPathDE, $l_Line, $l_Station, $msg, $FR, $DE, $EN, $DummyLang, $lc_Line, $lc_Station, $GroupName, $toto
_Ini()
_MainGui()
While GUIGetMsg() <> -3
WEnd
Func _Ini()
$Default = IniRead(@ScriptDir & "\Ini\Language.ini", "Default", "Lang", "!!! Fichier Config.ini erroné !!!")
$IcoPathEN = @ScriptDir & "\Ini\GCS_Search_EN.ico"
$IcoPathFR = @ScriptDir & "\Ini\GCS_Search_FR.ico"
$IcoPathDE = @ScriptDir & "\Ini\GCS_Search_DE.ico"
$aArrayBuild = IniReadSection(@ScriptDir & "\Ini\Language.ini", $Default)
If Not @error Then
$l_Line = $aArrayBuild[1][1]
$l_Station = $aArrayBuild[2][1]
$GroupName = $aArrayBuild[3][1]
EndIf
EndFunc
Func _MainGui()
$hGUI = GUICreate("", 800, 600)
;Affichage des icônes
$FR = GUICtrlCreateIcon($IcoPathFR, 15, 10, 10, 16, 16)
$DE = GUICtrlCreateIcon($IcoPathDE, 15, 30, 10, 16, 16)
$EN = GUICtrlCreateIcon($IcoPathEN, 15, 50, 10, 16, 16)
;Labels
$lc_Line = GUICtrlCreateLabel($l_Line, 10, 60, 140, 17)
$lc_Station = GUICtrlCreateLabel($l_Station, 10, 80, 140, 17)
_GUICtrlCreateGroup($GroupName & " ", 110, 50, 310, 200)
GUISetState(@SW_SHOW, $hGUI)
While 1
$Msg = GUIGetMsg()
Select
Case $Msg = $FR
IniWrite(@ScriptDir & "\Ini\Language.ini", "Default", "Lang", "FR")
$DummyLang = "FR"
_Reload($DummyLang)
Case $Msg = $EN
IniWrite(@ScriptDir & "\Ini\Language.ini", "Default", "Lang", "EN")
$DummyLang = "EN"
_Reload($DummyLang)
Case $Msg = $DE
IniWrite(@ScriptDir & "\Ini\Language.ini", "Default", "Lang", "DE")
$DummyLang = "DE"
_Reload($DummyLang)
Case $Msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
EndFunc
Func _Reload($DummyLang)
$aArrayBuild = IniReadSection(@ScriptDir & "\Ini\Language.ini", $DummyLang)
If Not @error Then
GUICtrlSetData ($lc_Line, $aArrayBuild[1][1])
GUICtrlSetData ($lc_Station, $aArrayBuild[2][1])
EndIf
EndFunc
Func _GUICtrlCreateGroup($sText, $iLeft, $iTop, $iWidth, $iHeight, $bColor = 0xFFFFFF, $bBkColor = -2, $iStyle = 1, $iBorder = 0)
Local $aLabel[6] = [5], $iCStyle
Local $aStringSize = _StringSize($sText)
If $iStyle Then $iCStyle = $SS_SUNKEN
$aLabel[1] = GUICtrlCreateLabel('', $iLeft + 1, $iTop, 9, 2, $iCStyle) ; Top Left Line.
$aLabel[2] = GUICtrlCreateLabel('', $iLeft + $aStringSize[2] + 10, $iTop, $iWidth - $aStringSize[2] - 10, 2, $iCStyle) ; Top Right Line.
$aLabel[3] = GUICtrlCreateLabel('', $iLeft, $iTop + 2, 2, $iHeight - 4, $iCStyle) ; Left Line.
$aLabel[4] = GUICtrlCreateLabel('', $iLeft + $iWidth - 2, $iTop + 2, 2, $iHeight - 4, $iCStyle) ; Right Line.
$aLabel[5] = GUICtrlCreateLabel('', $iLeft + 1, $iTop + $iHeight - 2, $iWidth - 2, 2, $iCStyle) ; Bottom Line.
For $i = 1 To $aLabel[0]
GUICtrlSetBkColor($aLabel[$i], $bColor)
GUICtrlSetBkColor($aLabel[$i], $bColor)
Next
GUICtrlCreateLabel("", $iLeft + 2, $iTop + 2, $iWidth - 4, $iHeight - 4)
GUICtrlSetBkColor(-1, $bBkColor)
GUICtrlCreateLabel($sText, $iLeft + 12, $iTop - 6, $aStringSize[2], 15, $SS_CENTER)
GUICtrlSetBkColor(-1, $bBkColor)
GUICtrlSetColor(-1, $bColor)
If $iBorder Then
GUICtrlCreateLabel("", $iLeft + 10, $iTop - 6, 2, 8, $iCStyle)
GUICtrlSetBkColor(-1, $bColor)
GUICtrlCreateLabel("", $iLeft + $aStringSize[2] + 10, $iTop - 6, 2, 8, $iCStyle)
GUICtrlSetBkColor(-1, $bColor)
GUICtrlCreateLabel("", $iLeft + 10, $iTop - 8, $aStringSize[2] + 2, 2, $iCStyle)
GUICtrlSetBkColor(-1, $bColor)
EndIF
EndFunc ;==>_GUICtrlCreateGroup