zackrspv Posted June 11, 2009 Share Posted June 11, 2009 Have a piece of code that works when the .BorderStyle = 1, but not when .BorderStyle = 0. I do not want my embeded richtext box to show a border, when i have it in my master program, but if i set BorderStyle to 0, while the border is gone, u can't move, resize the object. Example: expandcollapse popup#include <GUIConstantsEx.au3> $form = GUICreate("Very Basic RTF Editor", 300, 300) GUISetBkColor(0x444444) $oRP = ObjCreate("RICHTEXT.RichtextCtrl.1") $guiobject = GUICtrlCreateObj($oRP, 0, 0, 10, 10) With $oRP; Object tag pool .OLEDrag() .Font = 'Arial' .SelColor = 0xFFFFFF .BackColor = 0x444444 .Enabled = True .Locked = False .SelProtected = 0 .AutoVerbMenu = True EndWith GUISetState();Show GUI MsgBox(0, "Good", "With .BorderStyle = 1", 10) $oRP.BorderStyle = 1 GUICtrlSetPos($guiobject, 0, 0, 100, 100) Sleep(350) GUICtrlSetPos($guiobject, 0, 0, 200, 200) Sleep(350) GUICtrlSetPos($guiobject, 0, 0, 300, 300) MsgBox(0, "Good", "With .BorderStyle = 0", 10) $oRP.BorderStyle = 0 GUICtrlSetPos($guiobject, 0, 0, 100, 100) Sleep(350) GUICtrlSetPos($guiobject, 0, 0, 200, 200) Sleep(350) GUICtrlSetPos($guiobject, 0, 0, 300, 300) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() If you simply run that, u'll see How can i resolve this? -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
Skruge Posted June 12, 2009 Share Posted June 12, 2009 This is just a hack... It might not be what you're looking for. Perhaps someone who knows more about RichEdit can help you further.#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $form = GUICreate("Very Basic RTF Editor", 300, 300,Default,Default, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUISetBkColor(0x444444) $oRP = ObjCreate("RICHTEXT.RichtextCtrl.1") $guiobject = GUICtrlCreateObj($oRP, -3, -3, 306, 306) GUICtrlSetResizing($guiobject, $GUI_DOCKBORDERS) With $oRP; Object tag pool .OLEDrag() .Font = 'Arial' .SelColor = 0xFFFFFF .BackColor = 0x444444 .Enabled = True .Locked = False .SelProtected = 0 .AutoVerbMenu = True .BorderStyle=1 EndWith GUISetState();Show GUI While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
zackrspv Posted June 12, 2009 Author Share Posted June 12, 2009 This is just a hack... It might not be what you're looking for.Perhaps someone who knows more about RichEdit can help you furtherProblem still exists tho; With .BorderStyle = 0 specified, still cannot move or resize the control. -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
Skruge Posted June 12, 2009 Share Posted June 12, 2009 With .BorderStyle = 0 specified, still cannot move or resize the control.Upon further inspection, there's another control in play that needs to be resized as well. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $form = GUICreate("Very Basic RTF Editor", 300, 300,Default,Default, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUISetBkColor(0x444444) $oRP = ObjCreate("RICHTEXT.RichtextCtrl.1") $guiobject = GUICtrlCreateObj($oRP, 0, 0, 300, 300) With $oRP; Object tag pool .OLEDrag() .Font = 'Arial' .SelColor = 0xFFFFFF .BackColor = 0x444444 .Enabled = True .Locked = False .SelProtected = 0 .AutoVerbMenu = True .BorderStyle=0 EndWith GUISetState();Show GUI Sleep(1000) GUICtrlSetPos($guiobject, 0,0,100,100) ControlMove($form,"", "CtlFrameWork_ReflectWindow1", 0,0,100,100) Sleep(1000) GUICtrlSetPos($guiobject, 0,0,200,200) ControlMove($form,"", "CtlFrameWork_ReflectWindow1", 0,0,300,300) Sleep(1000) GUICtrlSetPos($guiobject, 0,0,300,300) ControlMove($form,"", "CtlFrameWork_ReflectWindow1", 0,0,300,300) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete()Again, still a hack. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] 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