ClientWidth under Windows

BlitzMax Forums/MaxGUI Module/ClientWidth under Windows

hamZta(Posted 2006) [#1]
Hi there!

ClientWidth and ClientHeight return values greater than 20000 under Windows.
Try this piece of code:
Global window:TGadget   = CreateWindow("Window 1", 100, 100, 500, 500, Null, WINDOW_TITLEBAR|WINDOW_RESIZABLE|WINDOW_STATUS|WINDOW_CLIENTCOORDS)
Global label:TGadget   = CreateLabel("", 0, 0, ClientWidth(window), ClientHeight(window), window, LABEL_FRAME)
Global button:TGadget   = CreatePanel(0, ClientHeight(label)/2-15, ClientWidth(label), 30, label)
Global button2:TGadget   = CreatePanel( ClientWidth(label)/2-15,0 , 30, ClientHeight(label), label)
SetPanelColor button, 255, 0, 0
SetPanelColor button2, 255, 0, 0
SetGadgetLayout label, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED, EDGE_ALIGNED
SetGadgetLayout button, EDGE_ALIGNED, EDGE_ALIGNED, 0, 0
SetGadgetLayout button2, 0, 0, EDGE_ALIGNED, EDGE_ALIGNED

Repeat
   If PollEvent() <> Null
      Select EventID()
         Case EVENT_WINDOWCLOSE
            Exit
      End Select
   End If
Until AppTerminate()


Normally, you should see a red "cross", scaling with the window.
Under MacOS this works perfectly!

Another point: Listboxes & Selecting items
The EVENT_GADGETSELECT-Event only appears on Windows, on MacOS you have to use EVENT_GADGETACTION. When using EVENT_GADGETACTION under Windows you have to doubleclick to make MaxUI bring it up.

This is very annoying because MaxGUI is said to work the same in every OS. I don't want to modify my sourcecodes when compiling for a different OS than MacOS, please fix this.

hamZta


jsp(Posted 2006) [#2]
Hi hamZta,
you connect a panel to a label this is not supported, although it might worked for you on the mac.

If you replace the label with another panel it works as expected!