shai Posted January 11, 2011 Share Posted January 11, 2011 for example. i have this gui: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $gui = GUICreate ("Mirrored Test", 400, 300, -1, -1, BitOR ($WS_CAPTION, $WS_SYSMENU), $WS_EX_LAYOUTRTL) $English = GUICtrlCreateButton("English", 10, 270, 70, 20) $Hebrew = GUICtrlCreateButton("hebrew", 90, 270, 70, 20) $label = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) GUISetState () While 1 $nMsg = GUIGetMsg () Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd hebrew = RTL language english = LTR language by default my gui is set of RTL i want that if i click on english button the gui is change to LTR. it is possibale? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2011 Moderators Share Posted January 11, 2011 shai, Does this do what you want? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <WinAPI.au3> $gui = GUICreate ("Mirrored Test", 400, 300, -1, -1, BitOR ($WS_CAPTION, $WS_SYSMENU), $WS_EX_LAYOUTRTL) $English = GUICtrlCreateButton("English", 10, 270, 70, 20) $Hebrew = GUICtrlCreateButton("Hebrew", 90, 270, 70, 20) $label = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) GUISetState () While 1 $nMsg = GUIGetMsg () Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $English ; Clear RTL extended style _WinAPI_SetWindowLong($gui, $GWL_EXSTYLE, 0) GUICtrlDelete($label) $label = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) Case $Hebrew ; Reset RTL extended style _WinAPI_SetWindowLong($gui, $GWL_EXSTYLE, $WS_EX_LAYOUTRTL) GUICtrlDelete($label) $label = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) EndSwitch WEnd M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
shai Posted January 11, 2011 Author Share Posted January 11, 2011 its lock fine. but this: GUICtrlDelete($label) $label = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) is necessary? for what? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2011 Moderators Share Posted January 11, 2011 shai, Try it with those lines commented out and you will see. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
shai Posted January 11, 2011 Author Share Posted January 11, 2011 ok i see. is little problam for me bocause in my real gui i have lot of conrols. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 12, 2011 Moderators Share Posted January 12, 2011 shai, Then why not make 2 GUIs like this and just swap between them? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <WinAPI.au3> $hGUI_H = GUICreate ("Mirrored Test -Hebrew", 400, 300, -1, -1, BitOR ($WS_CAPTION, $WS_SYSMENU), $WS_EX_LAYOUTRTL) $hButton_H = GUICtrlCreateButton("English", 10, 270, 70, 20) $hLabel_H = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) GUISetState() $hGUI_E = GUICreate ("Mirrored Test - English", 400, 300, -1, -1, BitOR ($WS_CAPTION, $WS_SYSMENU)) $hButton_E = GUICtrlCreateButton("Hebrew", 10, 270, 70, 20) $hLabel_E = GUICtrlCreateLabel ("THIS IS A TEST WITH NON MIRRORED TEXT", 10, 10, 250) GUISetState(@SW_HIDE) While 1 $nMsg = GUIGetMsg () Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButton_E GUISetState(@SW_SHOW, $hGUI_H) GUISetState(@SW_HIDE, $hGUI_E) Case $hButton_H GUISetState(@SW_SHOW, $hGUI_E) GUISetState(@SW_HIDE, $hGUI_H) EndSwitch WEnd Saves a lot of trouble. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
shai Posted January 12, 2011 Author Share Posted January 12, 2011 thanks i did it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now