Using Gambas 3.1.1 as distributed with Mageia 2. I believe it may be somewhat patched as it includes Mageia in the packaging wizard distribution selection screen.
I have a small front-end program for controlling jack_capture for which I have implemented a .conf settings file. Amongst other things, the settings file stores the last screen location/size. The entry in the .conf file may look like this: [Window] Geometry=[574,26,344,148,0] At startup the program will actually appear at 574,52. If this location is stored to the .conf file on exit then the next startup will put the window at 574,78. In general the window will always appear at a location 26 pixels below the "restored" setting. It is not, perhaps, a coincidence that the task-bar height is 26 pixels. If I create a settings .file entry like this: [Window] Geometry=[574,0,344,148,0] then the program will open with its window tucked up neatly below the task bar. The Fmain.Top value will, of course, be 26. Changing the task bar height to 32 will change all of the displacements from 26 to 32. So far, so good. If I can find the panel in the Desktop.Windows list then I can change my Settings file write procedure to incorporate the offset thus: Adjusted_Top = Fmain.Top - panel_height Settings["Window/Geometry"] = [Fmain.Left, Adjusted_Top, Fmain.Width, Fmain.Height, 0] That should solve the problem, but I am not clear as to why it is necessary. Why not use absolute screen locations and completely avoid the task bar issue? The observant among you may be wondering why I did not use the Write settings method. In fact I have used it but it causes a crash if the program is closed when it is on the second monitor. I can, however, use Settings.Read(Fmain, "Window") which will load the screen settings correctly, whichever screen is indicated by the X location. I was wondering if this is only an issue with Gambas 3 on the LXDE desktop, but I cannot test this as I am keeping this machine lean'n'mean; that means KDE4 and Gnome 3 are not allowed near it. Richard ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user