On Thu, Sep 29, 2011 at 6:35 AM, Oliver Sims <
oliver.s...@simsassociates.co.uk> wrote:
> In the User Guide's Exercise06, the Order Management dialog opens with the
> two pushbuttons at the bottom of the dialog window only half visible.
Hi Oliver,
I was just fooling with Exercise06 as checked in and it doesn't work. You
have this code:
imgCustList = .Image~getImage("customer\bmp\CustList.bmp") -- test1.ico
did not work.
imgProdList = .Image~getImage("product\res\ProdList.bmp")
imgOrderList = .Image~getImage("order\bmp\OrderList.bmp")
imgOrderForm = .Image~getImage("order\bmp\OrderForm.bmp")
There is no file: order\bmp\OrderList.bmp There is only:
order\bmp\OrderList.ico
If the program is working for you, it is likely that you have a file:
order\bmp\OrderList.bmp on your system that you have not committed to the
repository.
On the other hand, you do have the comment test1.ico did not work.
So I thought it might be worth pointing out to the general audience that
icon files and bitmap files have a different format. They are not
interchangeable. When you use icons and bitmaps, the underlying Windows API
requires that you inform it what type of image the file is. So, ooDialog
requires the programmer to specify that, so it can pass the information on
to the Windows API.
This code does work, using the image files you have committed:
imgCustList = .Image~getImage("customer\bmp\CustList.bmp") -- test1.ico
did not work.
imgProdList = .Image~getImage("product\res\ProdList.bmp")
imgOrderList = .Image~getImage("order\bmp\OrderList.ico",
.Image~toId(IMAGE_ICON))
imgOrderForm = .Image~getImage("order\bmp\OrderForm.bmp")
tmpIL = .ImageList~create(.Size~new(64, 64), .Image~toID(ILC_COLOR4), 4,
0)
if \imgCustList~isNull, \tmpIL~isNull then do -- check for errors in
images/imagelist
tmpIL~add(imgCustList) -- item 0 in the list
tmpIL~add(imgProdList) -- item 1 in the list
tmpIL~addIcon(imgOrderList) -- item 2 in the list
tmpIL~add(imgOrderForm) -- item 3 in the list
In the .Image~getImage() method, you need to specify the type of image that
the file is. The default is bitmap, so you can omit that for bitmaps. In
this case, you are using an icon image, so you need to specify that
OrderList.ico is an icon.
Then in the .ImageList, the add() method adds a bitmap image. For an icon
image you need to use addIcon(). With the above changes, things work.
But, if you really meant to use a bitmap file, you probably need to commit
the file.
By the way, I see what you mean about the original appearance of the
dialog.
Clicking on the border actually causes a size event. It is almost
impossible for a human to do a click with a mouse without jiggling the mouse
by a pixel or two. So the size of the dialog will change by that pixel
--
Mark Miesfeld
> When I
> click on the window border (no re-size - just a click) the ListView above
> the buttons becomes less tall, and the button become fully visible.
>
> I can't find a way of either getting the correct size of listview to
> appear,
> or of emulating in code the click on the border to make the lisview shrink
> to its proper starting size.
>
> Btw, the dialog is re-sizeable and uses DlgArea and DlgAreaU.
>
> Any thoughts?
>
> --Oliver
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Oorexx-users mailing list
> Oorexx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-users
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users