well maybe we were thinking backwards on this.
instead of using the open dialog for the image.
the other way around is...
can i use the path from the open dialog to set the field & then that fire to set the image?
since your research says the set cavans doesn't fire back the path.
OH an thank you for enjoying my art.
by the way -- the screen shot was of a card, i was trying to make my own dialog already.
Date: Thu, 30 Dec 2010 18:36:45 +0100
From: sparkythex@hotmail.com
Subject: Re: HyperNext bug
I got a nice suprise - you have some really great images - cartoons on your links.
About your program - unfortunately HyperNext file dialogs do not show the preview of an image - i think you could probably make your own file access with previews using a card, canvas, listbox and initially use the system dialog box to get the folder to browse - sorry its messy - i'll look into a solution for this in HyperNext V4
About setting the page for you depending upon an image.- i've just found a serious bug - when an image is dropped onto a canvas - the canvas event does not fire - this ruins so many things
My idea was to drop the image onto the canvas - then the canvas event would fire and allow your code to get image size, re-size canvas, and move canvas to correct postion etc - then you could generate HTML code from this
I hope you have a happy New Year, and fun with your programming.
On 12/24/2010 5:10 PM, sparky thex wrote:
Thanks so much for the help you have given.
I really do appreciate it!!!
Oh and merry Christmas, don't waste to much of it on this!!!
================
what this screen shot shows is the add image card of my app.
which is not quite an html editor but it is to design a template for a webcomic book that will set up the page for you in a html frame set.
it also shows a screen shot of an html program i use.
you can still answer this on the forum but i figured this may make it easier to help you see, what i need to accomplish, or if it can be done.
-- original post ---
viewtopic.php?f=17&t=72&p=275#p275
this requires the path to be known.
what I was after was an image open dialog [[WITH A PREVIEW]] .
I need the user to use a browse button that lets them chose file. or to know the path & put it in a field1 that is for url.
then it would detect that path is valid (probably by lost focus)
it would then load in to the canvas the preview. (it is 100x100)
there are opts for using image default height & width. or setting custom h.& w.
then it would generate html code that would look something like "<img style="width: 576px; height: 737px;" alt="" src="../pages/end.jpg">"
(i wish i could show you a screen shot.)
except i must have missed something because this doesn't load the image & path looks all weird.
instead of showing all normal like
file:///Users/thex/Desktop/my%20mac/my%20doc/my_manga/Iron%20Mistress/web/pages/end.jpg
i got
Macintosh HD:Users:thex:Desktop:my mac:my doc:my_manga:Iron Mistress:web:pages:end.jpg
Local fname,fhandle,fdetails,ctypes,cpaths,cnames,fextens
Local pwidth,pheight
Global fullPathName
@ Get file handle via a Dialog Box
FileAsk(fname,fhandle,fdetails,ctypes,cpaths,cnames,fextens)
Put line 9 of fdetails into fullPathName
Put fullPathName into field 1
@@@@@@@@@
reset sizemsg
@ Clear all image banks
ImageBankReset
@ Reserve space for 1 image
ImageBankReserve(1)
@Load image and scale to full size
ImageBankLoad(1,fullPathName,1)
@ Get size of image
@@ @@ Put ImageBankWidthFN(1) into pwidth
@@ @@ Put ImageBankHeightFN(1) into pheight
@@@@@@@@@@@@@@
@ Open dialog
@FileGet
@CanvasLoadAsk(1,FileGet,1)
@@ @@ put fname into field 1
put 'Page lay out design is for 800 x800.' into mess1
put 'the width is more importaint however do to the size of the frame.' into mess1
put 'You may want to use scaling.' into mess1
put 'NOTE: Picutre size will remain,' into mess1
put 'the same, just displayed smaller.' into mess1
put 'You can use the "open in new page link" option.' into mess1
put 'to allow for viewing in full size.' into mess1
@@@@ test for pic size.
put field 3 into ans
if sizemsg>2 or ans>800 then
@do nothing, assume that warning was seen.
else
add 1 to sizemsg
message mess1
endif
@@@@@@@@@