miketh2005 Posted June 20, 2010 Posted June 20, 2010 (edited) Hi, what I'm wanting to do is a little complicated. An Image I have is too big to fit in my GUI (resizing the GUI is not an option), so I need to put an image in an iframe, with a scroll bar, but at the same time, I don't want the image to LOOK like it's in an iframe, so we no borders around it. Just a scroll bar at the side. Anyway to do this? Thanks! EDIT: Woot! 100th post! Edited June 20, 2010 by miketh2005
Mat Posted June 20, 2010 Posted June 20, 2010 On 6/20/2010 at 4:12 PM, 'miketh2005 said: Hi, what I'm wanting to do is a little complicated. An Image I have is too big to fit in my GUI (resizing the GUI is not an option), so I need to put an image in an iframe, with a scroll bar, but at the same time, I don't want the image to LOOK like it's in an iframe, so we no borders around it. Just a scroll bar at the side. Anyway to do this?Thanks!EDIT: Woot! 100th post! an iFrame? If you're embedding HTML then css 'border:none;' should do it I would have thought.If its a windows control then just change the styles. WS_BORDER, WS_EX_CLIENTEDGE etc. should be removed. AutoIt Project Listing
miketh2005 Posted June 20, 2010 Author Posted June 20, 2010 Umm, I didn't know you can imbed html? I was just reffering to an iframe as an example.. I want an image to be in a frame that the user can scroll down to see the rest on the image Anyway to do that? Thanks.
Mat Posted June 20, 2010 Posted June 20, 2010 On 6/20/2010 at 6:21 PM, 'miketh2005 said: Umm, I didn't know you can imbed html? I was just reffering to an iframe as an example.. I want an image to be in a frame that the user can scroll down to see the rest on the image Anyway to do that? Thanks.You might want to try out this. I haven't tried it, so I can't give you details about implementation, but it looks like it does exactly what it says on the tin.Iframes are an option, although you don't actually need them, you can just put an img tag in an ie object and size the object. Not sure about frames etc. but there is plenty of support for the ie udf on the forums.Open the helpfile and go here:User Defined Function Reference -> IE Management -> _IECreateEmbeddedAs a general rule, the IE functions are very well documented and support on the forums are great (more so than other UDF's). The example under that function should get you on your way, but other functions such as _IEDocWriteHTML are also relevant.Mat AutoIt Project Listing
Mat Posted June 20, 2010 Posted June 20, 2010 Ok. I tried the Scrollbars UDF, and it's pretty simple stuff. #include <GUIScrollbars_Ex.au3> ; It is possible to get the width and height dynamically using GDIPlus.au3 $sImg = "image.jpg" $iImgW = 1680 $iImgH = 1050 ; Create GUI $hGUI = GUICreate("Image", 400, 400, 100, 100) $hImage = GUICtrlCreatePic($sImg, 0, 0, $iImgW, $iImgH) ; Generate scrollbars _GUIScrollbars_Generate($hGUI, $iImgW, $iImgH, 0, 0, True) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd AutoIt Project Listing
miketh2005 Posted June 21, 2010 Author Posted June 21, 2010 Thanks alot mat! It was PERFECT just PERFECT, I made an exact replica, and I would've never been able to do it without your help! I really appreciate it, and if I get my money back from paypal, I'll pay you 20 bucks for helping out around the forum like this.
Mat Posted June 21, 2010 Posted June 21, 2010 On 6/21/2010 at 3:47 PM, 'miketh2005 said: Thanks alot mat! It was PERFECT just PERFECT, I made an exact replica, and I would've never been able to do it without your help! I really appreciate it, and if I get my money back from paypal, I'll pay you 20 bucks for helping out around the forum like this.Thank Melba, he did the hard work there. AutoIt Project Listing
Moderators Melba23 Posted June 21, 2010 Moderators Posted June 21, 2010 Mat,Thanks for that - very civil of you! I noticed you had this is your code:; It is possible to get the width and height dynamically using GDIPlus.au3 $sImg = "image.jpg" $iImgW = 1680 $iImgH = 1050The answer is "Yes" and you do it like this: $sFile = "image.jpg" _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($sFile) $iX = _GDIPlus_ImageGetWidth($hImage) $iY = _GDIPlus_ImageGetHeight($hImage) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown()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: Reveal hidden contents 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
Mat Posted June 21, 2010 Posted June 21, 2010 (edited) On 6/21/2010 at 4:11 PM, 'Melba23 said: Thanks for that - very civil of you! No problems I wasn't about to take all the credit for writing an example of a much bigger UDF. On 6/21/2010 at 4:11 PM, 'Melba23 said: I noticed you had this is your code: ; It is possible to get the width and height dynamically using GDIPlus.au3 The answer is "Yes" and you do it like this: But it wasn't a question... It was a statement I knew it was possible but I couldn't be asked to try and find the snippet. Edited June 21, 2010 by Mat AutoIt Project Listing
Moderators Melba23 Posted June 21, 2010 Moderators Posted June 21, 2010 Mat,Old age I am afraid - I read it as "Is it" and not "It is". Must clean my glasses....now where did I put my handkerchief...........mumble, mumble..... 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: Reveal hidden contents 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
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