Is there anyway to set multiple row colors all at once like ATGUISETPROPS?
When I refresh the grid with new data the highlights stay there. I tried setting all the foreground and background colors for the entire grid by using ATGUISETPROP and setting the col and row values to zero. I couldn't get it to work so instead of just setting the highlight colors I have to reset them all for each row whenever I load new data. Is there a better way to re-initialize the grid colors?
Finally, is there any way to disable the checkbox on specific rows?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Is there anyway to set multiple row colors all at once like ATGUISETPROPS?
When I refresh the grid with new data the highlights stay there. I tried setting all the foreground and background colors for the entire grid by using ATGUISETPROP and setting the col and row values to zero. I couldn't get it to work so instead of just setting the highlight colors I have to reset them all for each row whenever I load new data. Is there a better way to re-initialize the grid colors?
Finally, is there any way to disable the checkbox on specific rows?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Can you set multiple row colours at once? No.
However, you can speed the process up enormously by using macros. In the normal state, every call to an ATGUI subroutine results in a round trip between the client and the server. That makes updating a lot of properties really slow. So, a macro "records" all the property changes, and when you "run" the macro, it sends all those changes to the client in one hit.
To start recording a macro:
CALL ATGUIBEGINMACRO("", GUIERRORS, GUISTATE)
Now do all your property setting.
To run the macro:
CALL ATGUIENDMACRO(MACRO, GUIERRORS, GUISTATE)
IF (MACRO NE "") THEN
CALL ATGUIRUNMACRO(MACRO, "", GUIERRORS, GUISTATE)
END
Of course, you should also be checking for errors after each CALL.
Check out the section in the help titled: GUI Macro Functions
Your second question is equally awkward. You can't change the state of individual cells in the grid. But you can make whole columns read-only. So, presumably, you have some rules for when you want a checkbox to be enabled/disabled. You will need to use the ACTIVATEROW event to set the initial column read-only state when you enter a row, and then update that state as other things change. It is awkward but it works!
Cheers,
Brian
------------------------------
Brian Speirs
Senior Analyst - Information Systems
Self Registered
Wellington NZ
------------------------------
Is there anyway to set multiple row colors all at once like ATGUISETPROPS?
When I refresh the grid with new data the highlights stay there. I tried setting all the foreground and background colors for the entire grid by using ATGUISETPROP and setting the col and row values to zero. I couldn't get it to work so instead of just setting the highlight colors I have to reset them all for each row whenever I load new data. Is there a better way to re-initialize the grid colors?
Finally, is there any way to disable the checkbox on specific rows?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Cheers,
Brian
------------------------------
Brian Speirs
Senior Analyst - Information Systems
Self Registered
Wellington NZ
------------------------------
Can you set multiple row colours at once? No.
However, you can speed the process up enormously by using macros. In the normal state, every call to an ATGUI subroutine results in a round trip between the client and the server. That makes updating a lot of properties really slow. So, a macro "records" all the property changes, and when you "run" the macro, it sends all those changes to the client in one hit.
To start recording a macro:
CALL ATGUIBEGINMACRO("", GUIERRORS, GUISTATE)
Now do all your property setting.
To run the macro:
CALL ATGUIENDMACRO(MACRO, GUIERRORS, GUISTATE)
IF (MACRO NE "") THEN
CALL ATGUIRUNMACRO(MACRO, "", GUIERRORS, GUISTATE)
END
Of course, you should also be checking for errors after each CALL.
Check out the section in the help titled: GUI Macro Functions
Your second question is equally awkward. You can't change the state of individual cells in the grid. But you can make whole columns read-only. So, presumably, you have some rules for when you want a checkbox to be enabled/disabled. You will need to use the ACTIVATEROW event to set the initial column read-only state when you enter a row, and then update that state as other things change. It is awkward but it works!
Cheers,
Brian
------------------------------
Brian Speirs
Senior Analyst - Information Systems
Self Registered
Wellington NZ
------------------------------
Thanks Brian!
The macro did the trick. Now the screen refreshes like normal. That fixes the main issue. The others would have been nice but aren't really needed for my app.
I wasn't able to set the foreground and background colors for the entire grid by setting col and row to zero. It just didn't seem to do anything. It's possible there's a bug. I have an older version of the ATGUI programs from AccuTerm 7.1. Upgrading isn't an option here because we're retiring our MVDB system by the end of the year.
Using the macro sped everything up just fine so I don't mind setting the row colors individually.
Thanks again for the help!
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Thanks Brian!
The macro did the trick. Now the screen refreshes like normal. That fixes the main issue. The others would have been nice but aren't really needed for my app.
I wasn't able to set the foreground and background colors for the entire grid by setting col and row to zero. It just didn't seem to do anything. It's possible there's a bug. I have an older version of the ATGUI programs from AccuTerm 7.1. Upgrading isn't an option here because we're retiring our MVDB system by the end of the year.
Using the macro sped everything up just fine so I don't mind setting the row colors individually.
Thanks again for the help!
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
[Note one issue I often bump into is setting properties for a grid BEFORE I have put the data into it. That causes the GUI to crash, because by definition, you cannot set a property on a row that doesn't (yet) exist. The answer to that one is to explicitly set GPROWS to the final value before setting the properties (like colours), and then everything displays nicely when the data is pushed into the grid].
Cheers,
Brian
------------------------------
Brian Speirs
Senior Analyst - Information Systems
Self Registered
Wellington NZ
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.