![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
acmedia
Senior Member
Joined: April 26 2005 Status: Offline Points: 119 |
Post Options
Thanks(0)
Quote Reply
Topic: Changing the width of a grid columnPosted: May 04 2006 at 4:54am |
|
The manual says that:
GPCOLWIDTH is the width of column (separate each column’s width with value marks). The width for an individual column can be accessed by ATGUIGETPROP and ATGUISETPROP by specifying nonzero COL argument. So if I do: CALL ATGUISETPROP(GUIAPP, GUIFRM, 'grdMenuItem', GPCOLWIDTH, 2, 0, 200, GUIERRORS, GUISTATUS) I should be able to change the width, but what happens is I get an error of: Program "ATGUISETPROP": Line 59, Variable "STATE" previously undefined. Empty string used. and GUIERRORS is: 3 3²ATGUISETPROP²²0²5001²GUI environment not initialized (command=ATGUISETPROP) So what's going wrong? |
|
![]() |
|
pholmes
Groupie
Joined: April 15 2004 Location: United States Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: May 04 2006 at 5:13am |
|
Sounds like your variable GUISTATUS may be incorrect. It must be the same variable that you called ATGUIINIT with.
|
|
![]() |
|
acmedia
Senior Member
Joined: April 26 2005 Status: Offline Points: 119 |
Post Options
Thanks(0)
Quote Reply
Posted: May 04 2006 at 5:45am |
|
Thanks - if you hadn't have said that I would have stared at the code for hours without seeing that I'd typed GUISTATUS when I should have typed GUISTATE.
|
|
![]() |
|
pholmes
Groupie
Joined: April 15 2004 Location: United States Status: Offline Points: 70 |
Post Options
Thanks(0)
Quote Reply
Posted: May 04 2006 at 6:12am |
|
Been there, done that
|
|
![]() |
|
homerlh
Beta Tester
Joined: November 11 2004 Location: United States Status: Offline Points: 288 |
Post Options
Thanks(0)
Quote Reply
Posted: May 09 2006 at 3:00am |
|
Greetings,
I've got a question about column widths in a grid or any of the other constructs that support multiple columns. I like to change the width of the column to pretty much reflect the widest item in the column. What I do is build the grid on a line by line basis, counting the bytes in each column. I do this for each line, comparing to the current maximum width and a previously established minimum size list. When I have finished loading the grid, I load its values, then I load its column widths. The problem is that the column widths are always too long for long fields. Narrow fields seem to be very close, but I've got one field that thinks it is 53 characters wide. After the resize, it looks like the field would hold 15 to 20 additional characters. Has anyone else noticed this activity and does anyone know whether anything can be done about it? Thanks, Larry Hazel |
|
![]() |
|
acmedia
Senior Member
Joined: April 26 2005 Status: Offline Points: 119 |
Post Options
Thanks(0)
Quote Reply
Posted: May 09 2006 at 5:52am |
|
I first assumed that when 'characters' was used as the unit of measurement it was based on the font AccuTerm uses for the green screen version, probably AccuTerm New, but it looks like it's not - no combination of font, size, weight, and even whether the control has a border or not gives a match.
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: May 12 2006 at 12:17pm |
|
Hi All -
When you use a scale mode of "characters" in a GUI application, AccuTerm assumes a character is 12 points high and 6 points wide. You need to check the display resolution and DPI to convert points to pixels, and then adjust this for the font size you are actually using. Its never going to be exact - if you use a fixed-pitch font for your GUI control, it will be close, but with vaiable-pitch fonts it can be off by a large factor. Welcome to Windows! Thanks, Pete |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |