Today I was asked about “Snap to Grid”. You know the sort of thing I mean. The exact question was “How can I switch on Snap to Grid in Siebel Tools Applet Web Editor?”. The student was surprised by my answer.
Snap to Grid – Applet Web Editor in Siebel Tools
My answer was : “Snap to Grid is already active by default in Siebel Tools using the Grid Layout”. Anyone using the Grid Layout template will see that there is a Grid used as the background to the Applet Designer, and if you look closer you will see that each dot is 8 pixels apart. And if you move a Control in Siebel Tools, it snaps to the nearest dot.
Where, why, and so what?
The Applet Designer, as many mystery story readers will remember, is Internet Explorer-based, and uses a style-sheet called tools.css in the Public/ENU/Files sub-folder and in there you will see a style called “GridCanvas”. There is a bitmap used as background. It is 64 x 64 pixels. And shows 8 dots per image.
If you study the Style, you will see it has a width of 1024px defined, and a height of 800px. Now you know why there is a fixed size of Applet Designer when you use the Grid Layout. And when you consider the above, you can begin to unravel the Item Identifiers that you see in the Applet Web Template Items list.
Consider that the topmost left corner of the Applet Designer has a coordinate of 1,1. Consider that each dot to the right, the X value goes up by 1. Consider that each dot down, the Y value goes up by 1000 (yeah, really).
So a Label positioned thus, has a Item Identifier of 18,002. 17 dots down (index starting at 1) and 1 dot right (index also starting at 1). Move it one dot down, 19,002. One dot right, 19,003. Und so weiter…
Once you know this, changing Item Identifiers on the fly is a little easier without always opening the Web Editor…
Snap to Grid – Bookshelf
There is a link here (to Siebel Bookshelf 8.0, but I am sure you can find it in your version)