[R] Graphique et boite à onglets
Posté : lun. 22 avr. 2019 15:09
Bonjour,
Je n'arrive pas à comprendre pourquoi un graphique ne s'affiche pas sur une boite de dialogue à onglet.
Sur une Gui simple elle s'affiche sans souci.
J'utilise Koda, et quand je fais F5 dans Scite pour exécuter le code, le graphique n'apparait pas et si je veux reprendre le .kxf le graphique à disparu.
Auriez-vous la solution, ou est-ce pas possible d'utiliser les graphique avec une boite de dialogue à onglets ?
Exemple GUi simple
Exemple Gui avc boite de dialogue à onglets
Merci 
Je n'arrive pas à comprendre pourquoi un graphique ne s'affiche pas sur une boite de dialogue à onglet.
Sur une Gui simple elle s'affiche sans souci.
J'utilise Koda, et quand je fais F5 dans Scite pour exécuter le code, le graphique n'apparait pas et si je veux reprendre le .kxf le graphique à disparu.
Auriez-vous la solution, ou est-ce pas possible d'utiliser les graphique avec une boite de dialogue à onglets ?
Exemple GUi simple
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 544, 295, 192, 124)
Global $Graphic1 = GUICtrlCreateGraphic(48, 32, 449, 226)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF0000)
GUICtrlSetGraphic(-1, $GUI_GR_PIE, 233, 109, 98, 45, 315)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF00FF)
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 208, 39, 29, 31)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 544, 295, 192, 124)
Global $Graphic1 = GUICtrlCreateGraphic(48, 32, 449, 226)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF0000)
GUICtrlSetGraphic(-1, $GUI_GR_PIE, 233, 109, 98, 45, 315)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF00FF)
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 208, 39, 29, 31)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\AutoIT\Charier\Compactage\Formtest.kxf
Global $Form2 = GUICreate("Boite de dialogue à onglets", 388, 276, 302, 218)
GUISetIcon("D:\005.ico", -1)
Global $PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
Global $TabSheet1 = GUICtrlCreateTabItem("Onglet 1")
Global $Graphic1 = GUICtrlCreateGraphic(88, 72, 225, 129, BitOR($GUI_SS_DEFAULT_GRAPHIC,$WS_BORDER))
GUICtrlSetBkColor(-1, 0xF0F0F0)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF0000)
GUICtrlSetGraphic(-1, $GUI_GR_PIE, 117, 68, 44, 45, 315)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF00FF)
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 112, 37, -16, 16)
Global $TabSheet2 = GUICtrlCreateTabItem("Onglet 2")
Global $TabSheet3 = GUICtrlCreateTabItem("Onglet 3")
GUICtrlCreateTabItem("")
Global $Button1 = GUICtrlCreateButton("&Valider", 166, 272, 75, 25)
Global $Button2 = GUICtrlCreateButton("&Annuler", 246, 272, 75, 25)
Global $Button3 = GUICtrlCreateButton("&Aide", 328, 272, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\AutoIT\Charier\Compactage\Formtest.kxf
Global $Form2 = GUICreate("Boite de dialogue à onglets", 388, 276, 302, 218)
GUISetIcon("D:\005.ico", -1)
Global $PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
Global $TabSheet1 = GUICtrlCreateTabItem("Onglet 1")
Global $Graphic1 = GUICtrlCreateGraphic(88, 72, 225, 129, BitOR($GUI_SS_DEFAULT_GRAPHIC,$WS_BORDER))
GUICtrlSetBkColor(-1, 0xF0F0F0)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF0000)
GUICtrlSetGraphic(-1, $GUI_GR_PIE, 117, 68, 44, 45, 315)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF00FF)
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 112, 37, -16, 16)
Global $TabSheet2 = GUICtrlCreateTabItem("Onglet 2")
Global $TabSheet3 = GUICtrlCreateTabItem("Onglet 3")
GUICtrlCreateTabItem("")
Global $Button1 = GUICtrlCreateButton("&Valider", 166, 272, 75, 25)
Global $Button2 = GUICtrlCreateButton("&Annuler", 246, 272, 75, 25)
Global $Button3 = GUICtrlCreateButton("&Aide", 328, 272, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
