on 03-26-2010 7:11 AM
Hi All,
I am really pulling my hair out trying to position a text box on the screen.
I have added a new folder on the service call screen. This folder's pane level is set to 8. Now I want to add a check box onto that folder. I get the position of another item on the screen (let's say the Origin combo box on the first folder) and then I set my new item's top position to the same position as the Origin combo box. My code:
aItem = oForm.Items.Item("67") 'Origin Combo Box
oItem = oForm.Items.Add("chk_Refr", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
oItem.Left = 10
oItem.Top = aItem.Top
oItem.FromPane = 8
oItem.ToPane = 8
oCheck = oItem.Specific
oCheck.Caption = "Refrigeration"
This code does not put it in the same top position as the Origin Combo box, but almost half way down the screen. I have tried various other top values. I have started at 10, which puts it right at the top of the screen, I go down to about 180 which puts it just above the row of folders.
BUT it seems like as soon as I move it onto the folder, at let's say Top = 200, it moves it down to 200 from the top of the folder! So it's way down. The difference from Top = 180 to Top = 200 is about 10cm (4 inches) on my screen?????
It does the same even if I remove the FromPane and ToPane property setting.
Any ideas?
Also, I have a matrix on another tab that I also added, which I set to the same top position and that works great, no problem. Seems like it's only with the check box?
Thanks for any help in advance,
Adele
Hello Adele,
The problem: the window has been resized, and you put your checkbox on et_form_load
Try the following:
Add you checkbox at et_form_load and pval.before_Action = false
at et_form_resize event and pval.Before_Action = false set the checkbox relative position to an existsing system created item.
This is always working, and you hair will be remain on your head:)
Regards
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello freind
have yu set top as like
oitem.top=aitem.top +180
try it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for the reply.
Why would I want to do that? I want the item to move up a bit, not down even more.
The actual problem is that when I position it at 180 it is above the tab, when I position it at 200 it is way down on the screen, it's as if I can't get it into the space in between, which is about 10cm. I have tried oItem.Top = aItem.Top - 100, which just puts it right back to the top. Also tried oItem.Top = aItem.Top + 100, which puts it so low down it's almost off the screen.
I have tested with a check box and a text box, both have same behavior. Tested with a grid, doesn't do it.
Adele
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.