Workspace advice

Post your Gambas programming questions here.
AndyGable
Posts: 363
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Workspace advice

Post by AndyGable »

Hi all,

I was wondering if someone could help me

I have worked out how to use the Workspace tool (reather cool if you ask me) but everytime I add a form to the Workspace it is maximized.

I have set the form not to maximize but it does anyway . how do I stop the workspace from maximizing my forms? as some of the forms are
designed to be small and they look silly in full screen.
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Workspace advice

Post by cogier »

Can you explain what you are trying to do and perhaps post some example code.
User avatar
PJBlack
Posts: 185
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Workspace advice

Post by PJBlack »

workspace is not a tool but a container who is able to embed top level windows ... and every embeded window is resized to the clientw and clienth of his new parent (workspace)
AndyGable
Posts: 363
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Re: Workspace advice

Post by AndyGable »

Hi all,

I hope this can help with what I am trying to do

When the application starts up I can display this

Image

when the user presses A (sign on) at the moment i am getting this

Image

but I would like this

Image

is there another way of doing this as the while key labels are used though out the application
User avatar
PJBlack
Posts: 185
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Workspace advice

Post by PJBlack »

reparent your forms to panels ...

Code: Select all

FMain -> Panel1 (set x,y,w,h like you desire)
      -> Panel2 (set x,y,w,h like you desire)
         
FLaneClosed.Reparent(Panel1 [,x,y] )
FLogon.Reparent(Panel2 [,x,y] )                '' Setting x und y doesnt work for me here, but ...
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Workspace advice

Post by cogier »

I have put together a sample program. It does not use Workspace. See if it helps.

Image
LaneClosed-0.0.1.tar.gz
(22.67 KiB) Downloaded 251 times
AndyGable
Posts: 363
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Re: Workspace advice

Post by AndyGable »

Thanks for all the advice

would the panel method work with the individual forms key functions?

for example the frmsignedoff has this key press
A = Show the signed off screen
E = Show user Menu (populate the options on the side)
F1-F8 would use the menu option on the side


when the signed on screen is showed its keyPress are as follows
0-9 number entry
J = clear
k = Cancel and show the signed off screen
Enter = Moves down to the password screen and then when password has been entered it would then check the user details
in the database and is the user is found the system would sign on the entered cashier.
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Workspace advice

Post by cogier »

I have made some more modifications for you.

It is not complete, but it should get you going.
LaneClosed-0.0.2.tar.gz
(31.06 KiB) Downloaded 267 times
User avatar
PJBlack
Posts: 185
Joined: Tuesday 9th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: Workspace advice

Post by PJBlack »

AndyGable wrote: Monday 4th January 2021 4:55pm would the panel method work with the individual forms key functions?
whom do you ask?

so if you ask me, i gave you a hint, charlie offers you a solution. if i had to, i would choose my variant, but a lot more detailed work is required here ... as always when you move outside the standard. Charlie's program is neatly structured, simple and logical. My recommendation would be to continue there ...
AndyGable
Posts: 363
Joined: Wednesday 2nd December 2020 12:11am
Location: Northampton, England
Contact:

Re: Workspace advice

Post by AndyGable »

@cogier,

Thanks I shall have a look and see what I can do

but at the moment I still can not fully get my head around this :(

@PJBlack
I can see Gambas is not at all like VB but I am sure i will get it in the end I assume Gambas implements this workspace how it does due to the way linux and the xserver works (or is it actually a Gambas thing?)

Your methold works but none of the separate key presses are supported (as I see it the form is embedded into the fMain form so its key presses are being trigger and not the frmSignedOff etc.

@General Rant
Am I asking to much from Gambas? I know i can Just install Windows 7 onto the customers PoS terminals but I would like to have linux on the front end for speed and security (ideally I will be moving the back office systems into Linux as well at some point but all my programs use the Windows MDI interface)
Post Reply