Since the move to Web 2.0, the palette window seems to have gone; I’m seeing that only now.
Several users have asked for it to come back and the answer was to wait because Web 2.0 was brand new and additions would come. Other answers were involving Javascript or other languages.
Now that Web 2.0 is no longer “new” and not wanting to learn another language (one point of Xojo being it replaces mixing languages, usually), I’m wondering whether there’s a replacement.
I need to show a picture (preview) of a selected item. A movable view is the best choice.
They look awesome, indeed.
Sadly, the price is way too much for me (each year, I even hesitate to renew my Xojo licence, because I’m a hobbyist and don’t get much money (not only from programming); so you can guess, 300$, even lasting for one year, is expensive for just my need of the Xojo web palette replacement (don’t get me wrong, if I had that money, I’d happily use this suite and make greater apps; I just can’t)).
So I’ll take it as there’s no free palette for Xojo at this time; I’ll take the challenge of displaying my preview otherwise.
And, the way to open popup window (passing a boolean to the Show method) has also ceased to exist.
I’m disappointed. My app has a listbox and selecting a row should show a picture next to it (wherever that is). The picture isn’t small, so putting an ImageWell on the window is barely a solution (as each picture have different sizes and, with no selected item, there’s no picture at all, so there are a lot of blank space with this design).
What would be a good way to solve this? (cheap or free, preferably)
Thanks.
The only reason I need a palette is to display a moveable picture floating on the page; the appearance of the window/frame is not important.
When Web2.0. was launched, mouse events were removed, so I can’t code the moveable behaviour in code; would some calls allow a WebContainer to have a title bar (or be otherwise user-moveable)?
Adding a window bar is probably as simple as using a WebCanvas.
Making the container movable would indeed require MouseDown, MouseUp and some way to get the coordinates of the mouse cursor. All that is available with JavaScript, but will require sending back the events to the Xojo program. It is possible with the WebSDK. But this is getting beyond the scope of this post.
Currently, I’m facing with a problem, though: when changing the height with the code below, the titlebar can go above the page (since the window stays centred) and becomes inaccessible.
I’ve checked the Top property of all related objects (the AttyWebJSPanel and the WebContainer, also combining with their Page and Parent properties); they all return 0, so I cannot store and put the palette back.
How would one find and set the actual top/left properties without these ones?
Here’s my code:
'p is.a picture
'PreviewContainer is the AttyWebJSPanel object
'refTestExample is the AttyWebContainer object
dim wt As Integer=PreviewContainer.Top //Current top position (but returns always 0)
refTestExample.IV1.Picture=p 'Put picture in WebImageViewer
'Adjust size:
PreviewContainer.Height=p.Height
PreviewContainer.Width=p.Width
PreviewContainer.DoResize
PreviewContainer.Top=wt 'Doesn't work yet, obviously
May I just ask you whether I’ve done something wrong?
I think I’ve solved the problem. Keep in mind though that repositioning only works with some layout types not all. The layouts on the right, I didn’t integrate them because when I wrote the class I didn’t need them.