Align floating items to a layer
I'm trying to build a website featuring scalable backgrounds based on this example here: http://wanderingphotog.businesscatalyst.com/
My problem is when I add additional items, such as a logo, a top menu, and thumbnails they float freely around the screen as the browser is resized (at least in Muse preview mode). Is there any way to align them to a specific layer so when the browser is scaled the elements stay aligned in neat blocks? For example in the preview above the top title appears aligned horizontally to the bottom text elements. Is there some property in Muse that I can tick to make it so?
Thanks!
Hi
You can group the items and pin them on fixed position of page, so that the grouped items would be in same page position.
Thanks,
Sanjit
Similar Messages
-
Align page items (AS) (CS3)
Scripting Gurus,
Is there some simple AS syntax to align selected page items on a page?
Dictionary seems to imply that, saying:
align distribute items page item : The page items to align or distribute.
align option left edges/top edges/right edges/bottom edges/horizontal centers/vertical centers : The type of alignment to apply.
I attempted this:
tell page items in selection
set vertical alignment to top edges
end tell
Thanks!
JoeIts kinda of crazy but here ya go, I wish the AppleScript Dictionary listed examples ...esp. when the syntax is wacky.
select a bunch of images, or have the object references in a list(I just use selection to make it easier):
tell application "Adobe InDesign CS3"
tell active document
set myimages to selection
align align distribute items myimages align option left edges
end tell
The text in the red is where you put those paramaters listed in the dictionary.
~Mike -
How to control the visibility of image items on a layer?
I want to control the visibility of image items on the layer. Some items will be visible and others will be hidden on the same layer.
Can anyone tell me how can I achieve this using SDK APIs.Hi,
You can try following facade function. And set the Opacity value to 0 for hidden the images or set greater then 0 value for visiablity of image.
IXPAttributeFacade::SetOpacity (const UIDList &itemList, PMReal opacity);
I hope it will resolve your problem.
Regards,
Jitendra Kumar -
Move all the items of a layer to new page?
hi,
is it possible to move all the items in the layer to move to the new page with the same coordinates in the page 1
eg:
i have two layer named "layer_page1"and one more layer named "layer_page2"
i have 2 text frame objects , 1 rectangle objects in the "
layer_page1" and 3 text frame objects, 3 rectangle objects in the "layer_page2"
all the items are in the page.items(0).
now i will add a new page to the document
and i need to move all the items in the layer named "layer_page2" to the new page, i.e page.item(1). is it possible?
if it is possible it will solve lot my efforts typing.. and verifying.
your comments are highly appreciated.John,
hm, I don't think your untested script will work in a predictable way. Technically it will work a bit. Just tested it. But:
1. if you loop from index 0 to the end, even if you loop from the end to index 0 you will mess the index of the pageItems when moving them to a different page
=> I recommend grouping all pageItems on the specified layer, so that we have to move only one pageItem, the new group
2. problem with move() to another page is, that you cannot retain the original page coordinates of the moved object, it will get 0,0 coordinates automatically
=> we have to store the coordinates of the group first, then move, then apply the old coordinates
3. in a real-world scenario we should deal with the possibility of locked pageItems
4. Furthermore we have to make sure that the layer is not locked
The following example will unlock all pageItems on that layer and will lock them after they are moved:
//Move all objects on a layer of a page to a different page
var
d=app.activeDocument,
src=d.pages[0], dst=d.pages[1],
layer=d.layers.itemByName("Layer 2"),
i;
var myItemsToMove = new Array();
var myItemsLocked = new Array();
for (i=0; i<src.pageItems.length; i++) {
if (src.pageItems[i].itemLayer === layer) {
if(src.pageItems[i].locked){
myItemsLocked.push(src.pageItems[i].id);
src.pageItems[i].locked=false;
myItemsToMove.push(src.pageItems[i]);
//Check, if layer is locked:
if(layer.locked){
var layL = true;
layer.locked=false;
// create a group on the source page:
var newGroup = src.groups.add(myItemsToMove);
var gB = newGroup.geometricBounds;
//We have to move only ONE object, the new group
//To the destination page
newGroup.move(dst);
//To the old coordinates
newGroup.move(undefined,[gB[1],gB[0]]);
//Restore the state of the pageItems
//Ungroup them once:
newGroup.ungroup();
//Relock the former locked objects:
for(n=0;n<myItemsLocked.length;n++){
d.pageItems.itemByID(myItemsLocked[n]).locked=true;
//Relock layer if it was locked:
if (layL){layer.locked=true};
Uwe -
Right aligning one item in a VerticalLayout container?
Hi All,
I've got a container with a VerticalLayout. I want all of the items to be left-aligned, except for the first one, which I want to be right-aligned.
Is there a way to make that first item right-aligned? If this were HTML I might put float:right on the item and make the following items clear:both, and that would do it. But I'm not sure how to do it in Flex. Can anyone give me some insight?
Thanks!
-JoshYou can put it inside another container and right align that.
-
Hi everyone,
I'm using DW CS4 and am somewhat in a snag. I am trying to line up an image, text and another image side by side. I was successfully able to float the text to the right of the image (by using float: left) and now I am trying to float another image left of the text. However, when I attempt, the image does not move and the text expands out (I put the text in a DIV container and gave it a width of 800 px); my entire layout is 1280 pixexl. So what I'm asking is, how can I float an item next to another item? I've posted the code below. All help is greatly appreciated. Thank you!
**I posted my entire CSS and highlighted the area I am having issues with.
Website Dimensions:
body {
height: 1024px;
width: 1280px;
margin:0 auto;
position:relative
HTML:
<!--Main Content Begin-->
<div id="main_content">
<!--Top Hat Photo Begin-->
<div id="Top_Hat_Photo">
<img src="Dee 201 Big Smile Fade Surgical.jpg" width="438" height="376" alt="Dee Lewis" /></div>
<!--Top Hat Phote End-->
<!--Quotes Begin-->
<div id="Quotes">
<h1> Main Content</h1>
<p>"From writer to filmmaker to actress and back again. DeAara Lewis comfortably wears the hats of three crafts."</p>
<p> Pearl Washington </p>
<p> Tri State Defender</p>
<p> </p>
</div>
<!--Quotes End-->
<!--TV Icon Begin-->
<div id="TV_Icon">
<img src="TPIMH TV.jpg" width="303" height="325" alt="The People Inside My Head Coming Soon!" /></div>
<!--TV Icon End-->
</div>
<!--end "main content"-->
CSS:
#container #main_content {
#container #Header #Dee_Title {
padding-left: 50px;
width: 600px;
clear: both;
#container #main_content #Top_Hat_Photo img {
float: left;
#container #main_content #Quotes {
width: 800px;
float: left;
#footer {
clear: both;
#Header #Navigation_Menu ul {
margin: 0px;
padding: 0px;
list-style:none;
#Header #Navigation_Menu ul li {
float: left;
text-align: center;
#Header #Navigation_Menu ul li a:link, #Header #Navigation_Menu ul li a:visited {
padding:.2em .5em;
display:block;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:1em;
font-weight:bold;
color:#000;
text-decoration:none;
line-height:1.2em;
margin-right:.5em
#Header #Navigation_Menu ul li a:hover {
color:#C90;
#Header #Navigation_Menu ul li a.current, #Header #Navigation_Menu ul li a.current:hover, #Header #Navigation_Menu ul li a.current:active {
color:#00F;
cursor:default;Working with Floats & Margins:
http://alt-web.com/DEMOS/3-CSS-boxes.shtml
Captions with Floated Images
http://alt-web.com/DEMOS/CSS2-Captions-on-floated-images.shtml
Photo Layout
http://alt-web.com/TEMPLATES/Dark-Grid-II.shtml
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/ -
I want to make the item text of the combobox to be aligned vertically(Centred) . Actually I increased the height
of the combobox and after the increasing the combobox height, the text is not centred vertically.The code
snippet for increasing the height is as follows,
m_SpecifyCombo.SetItemHeight(-1,20);//CCombobox m_SpecifyCombo
After increasing the height the text in the combobox is not in the centre as shown in the below image,
But I want the text to be centred as shown in the below image.
Code snippet for owner drawn combobox:
#if !defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
#define AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
typedef enum {FONTS} STYLE; //Why have I enumerated, Cos, Maybe I might want something other than Fonts here
class COwnerDrawCombo : public CComboBox
// Construction
public:
COwnerDrawCombo();
COwnerDrawCombo (STYLE);
// Attributes
public:
void SetHilightColors (COLORREF hilight,COLORREF hilightText)
m_clrHilight = hilight;
m_clrHilightText = hilightText;
void SetNormalColors (COLORREF clrBkgnd,COLORREF clrText)
m_clrNormalText = clrText;
m_clrBkgnd = clrBkgnd;
static BOOL CALLBACK EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData);
void FillFonts ();
int GetSelFont (LOGFONT&);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCustComboBox)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~COwnerDrawCombo();
// Generated message map functions
protected:
STYLE m_enStyle;
COLORREF m_clrHilight;
COLORREF m_clrNormalText;
COLORREF m_clrHilightText;
COLORREF m_clrBkgnd;
BOOL m_bInitOver;
void DrawDefault (LPDRAWITEMSTRUCT);
void DrawFont(LPDRAWITEMSTRUCT);
void InitFonts ();
//{{AFX_MSG(CCustComboBox)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
//}}AFX_MSG
afx_msg long OnInitFonts (WPARAM, LPARAM);
DECLARE_MESSAGE_MAP()
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif //!defined(AFX_CUSTCOMBOBOX_H__F8528B4F_396E_11D1_9384_00A0248F6145__INCLUDED_)
// OwnerDrawCombo.cpp : implementation file
#include "stdafx.h"
#include "combobox.h"
#include "OwnerDrawCombo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define WM_INITFONTS (WM_USER + 123)
//I chose 123 cos nobody might use the same exact number.. I can improve this by use RegisterWindowMessage..
// COwnerDrawCombo
//Initial values of the text and highlight stuff
COwnerDrawCombo::COwnerDrawCombo()
m_enStyle = FONTS;
m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
m_clrBkgnd = GetSysColor (COLOR_WINDOW);
m_bInitOver = FALSE;
COwnerDrawCombo::COwnerDrawCombo (STYLE enStyle)
m_enStyle = enStyle;
m_clrHilight = GetSysColor (COLOR_HIGHLIGHT);
m_clrNormalText = GetSysColor (COLOR_WINDOWTEXT);
m_clrHilightText = GetSysColor (COLOR_HIGHLIGHTTEXT);
m_clrBkgnd = GetSysColor (COLOR_WINDOW);
m_bInitOver =FALSE;
COwnerDrawCombo::~COwnerDrawCombo()
BEGIN_MESSAGE_MAP(COwnerDrawCombo, CComboBox)
//{{AFX_MSG_MAP(COwnerDrawCombo)
ON_WM_CREATE()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
ON_MESSAGE (WM_INITFONTS,OnInitFonts)
END_MESSAGE_MAP()
// COwnerDrawCombo message handlers
void COwnerDrawCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
//I might want to add something else someday
switch (m_enStyle)
case FONTS:
DrawFont(lpDrawItemStruct);
break;
//I dont need the MeasureItem to do anything. Whatever the system says, it stays
void COwnerDrawCombo::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
void COwnerDrawCombo::DrawFont(LPDRAWITEMSTRUCT lpDIS)
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
CRect rect;
TRACE0 ("In Draw Font\n");
// draw the colored rectangle portion
rect.CopyRect(&lpDIS->rcItem);
pDC->SetBkMode( TRANSPARENT );
if (lpDIS->itemState & ODS_SELECTED)
pDC->FillSolidRect (rect,m_clrHilight);
pDC->SetTextColor (m_clrHilightText);
else
pDC->FillSolidRect (rect,m_clrBkgnd);
pDC->SetTextColor (m_clrNormalText);
if ((int)(lpDIS->itemID) < 0) // Well its negetive so no need to draw text
else
CString strText;
GetLBText (lpDIS->itemID,strText);
CFont newFont;
CFont *pOldFont;
((LOGFONT*)lpDIS->itemData)->lfHeight = 90; //9 point size
((LOGFONT*)lpDIS->itemData)->lfWidth = 0;
newFont.CreatePointFontIndirect ((LOGFONT*)lpDIS->itemData);
pOldFont = pDC->SelectObject (&newFont);
pDC->DrawText(strText, rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
pDC->SelectObject (pOldFont);
newFont.DeleteObject ();
void COwnerDrawCombo::InitFonts ()
CDC *pDC = GetDC ();
ResetContent (); //Delete whatever is there
EnumFonts (pDC->GetSafeHdc(),NULL,(FONTENUMPROC) EnumFontProc,(LPARAM)this);//Enumerate
m_bInitOver = TRUE;
BOOL CALLBACK COwnerDrawCombo::EnumFontProc (LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData)
if (dwType == TRUETYPE_FONTTYPE) //Add only TTF fellows, If you want you can change it to check for others
int index = ((COwnerDrawCombo *) lpData)->AddString(lplf->lfFaceName);
LPLOGFONT lpLF;
lpLF = new LOGFONT;
CopyMemory ((PVOID) lpLF,(CONST VOID *) lplf,sizeof (LOGFONT));
((COwnerDrawCombo *) lpData)->SetItemData (index,(DWORD) lpLF);
return TRUE;
int COwnerDrawCombo::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CComboBox::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
if (m_enStyle == FONTS)
//SetItemHeight(-1,30);
PostMessage (WM_INITFONTS,0,0);
return 0;
long COwnerDrawCombo::OnInitFonts (WPARAM, LPARAM)
InitFonts ();
return 0L;
void COwnerDrawCombo::OnDestroy()
if (m_enStyle == FONTS)
int nCount;
nCount = GetCount ();
for (int i = 0; i < nCount; i++)
delete ((LOGFONT*)GetItemData (i)); //delete the LOGFONTS actually created..
// TODO: Add your message handler code here
CComboBox::OnDestroy();
void COwnerDrawCombo::FillFonts ()
m_enStyle = FONTS;
PostMessage (WM_INITFONTS,0,0); //Process in one place
int COwnerDrawCombo::GetSelFont (LOGFONT& lf)
int index = GetCurSel ();
if (index == LB_ERR)
return LB_ERR;
LPLOGFONT lpLF = (LPLOGFONT) GetItemData (index);
CopyMemory ((PVOID)&lf, (CONST VOID *) lpLF, sizeof (LOGFONT));
return index; //return the index here.. Maybe the user needs it:-)
void COwnerDrawCombo::PreSubclassWindow()
// TODO: Add your specialized code here and/or call the base class
//Tried to do what Roger Onslow did for the button.. Did not work..?? Any R&D guys around :-)
Can anyone please let me know how can I achieve this.
Any help can be appreciated.
Thanks in advance
SivaVHi sivavuyyuru,
I cannot find a easy way to make this.
I think you may need to draw your own Combo Box control. And you could change the edit control more like static text. Check the article:
http://www.codeguru.com/cpp/controls/combobox/fontselectioncombos/article.php/c1795/Owner-Drawn-Font-Selection-Combobox.htm
In the resource editor, Owner draw -> variable , Has string->true, type->drop list.
The result:
Best regards,
Shu Hu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Floating Items in the browser window
I have a stage that is 4000 some pixils wide.
I have some items tht i would like to be on screen and in a fixed position no mater where you scroll.
2 to be centered - content and intro
1 to be top left and - logo
one to be top right - contact
i have the following code that is present in the compisioionReady that floats a symbol named content in the center of the browser window.
i need to add the other 3 items to this code.
Thoughts?
$(document).scroll(function(){
var leftEdgeWindow = $(this).scrollLeft()
setLeftEdge(leftEdgeWindow);
function setLeftEdge(base){
//get the content symbol
var contentObject = sym.getSymbol("content");
//here it is in jQuery
var content = contentObject.getSymbolElement();
//get some important widths
var contentWidth = content.width();
var windowWidth = $(window).width();
//find the left edge position
var leftEdge = base + (windowWidth/2) - (contentWidth/2);
content.css("left",leftEdge);
//content.css("position", "fixed");
setLeftEdge(0);Hi, blonde_rik-
You can also just set the CSS position on these specific elements to "fixed":
sym.$("content").css("position", "fixed");
-Elaine -
I am trying to insert floats in two or more cells but i don't how to right align it. I searched thru the tutorials but found some info only about right alignment of Integer type. Further i want to restrict entry of decimals i mean some cells (in a column) should accept 2 or 3 decimals.
Is there any material to read more about this or the gurus out here can help me with their insights.
TIA
ShomalYou must to have the model, like next code:
TableColumnModel columnModel = tableView.getColumnModel();
TableColumn colorColumn = columnModel.getColumn(0); //get the desire column
DefaultTableCellRenderer colorColumnRenderer = new DefaultTableCellRenderer();
colorColumnRenderer.setForeground(Color.red); //to change the color
colorColumnRenderer.setBackground(Color.gray);
colorColumnRenderer.setHorizontalAlignment(JLabel.RIGHT); //here you aling...
colorColumn.setCellRenderer(colorColumnRenderer);When the cell is editing if you want the same aling also you must to define the aligned like that
JTextField texto= new JTextField();
texto.setHorizontalAlignment(JTextField.RIGHT);
colorColumn.setCellEditor(new customEditor(texto));
This works for me... -
Select item(s) in layer
Hi all,
How do I select Item(s) in specific layer name
my code is
var layer=app.activeDocument.layers.everyItem().getElements("Info Layer");
can any one correct this, help will be appreciate
Thanks
SteveHI Trevor,
I have a doubt with the below js lines, If steve want to move the particular layer page items. In this case the below lines not working, So we have to loop it? Because he request to select the particular layer page items. so that, vandy loop the page items right!
Turn all Items yellow
app.activeDocument.layers.itemByName("Layer 1").pageItems.everyItem().fillColor = "Yellow"
Get Elements
myLayersItems = app.activeDocument.layers.itemByName("Layer 1").pageItems.everyItem().getElements()
thx,
csm_phil -
Align page item to region right edge.
Hi gurus
I have a region that has just one page item and I want to align it to right edge of its region.
How can I do that?
Thanks in advance
OscarMaheswara,
Thanks for your answer.
Really my region is a reports region of item-above-region-content type.
And the only page item has to be right-aligned to match rigthmost columns.
Can this info helps you?
Oscar -
Auto align layers moves my locked layer?
I am using CS4 and I want to align a couple of layers. I have no problem getting it to work, except for the fact that it will move all of my layers, even my background layer wich is locked. I thought that if you first locked a layer, then selected the other layers, all of those unlocked layers would be aligned to the locked layer? I want to keep that background layer from moving.
Thanks,
SteveYes the new Auto-align feature in Photoshop should be better implemented than it is. Locking the Movement of layers should certainly regsiter with Auto_align, and its quite ridiculous that it doesn't. If all selected layers happen to be locked then a warning should come up
D. Fosse has your answer over how to do this at present, it requires re-ordering your layers.
You should post a Feature Request about this. -
Hi all,
when I add an item to a region I can see the new item icon. In some cases the icon appears on the right of the item, in other cases it appears down the item.
Is it possible to set the alignment of "new item" icon?
thanks
MarcoHi Marco -
If you go the region properties (click the pencil icon on the region) on the attributes/style tab, the attributes section allows you to specify the order the attributes are shown in. The "New Item Indicator" is the attribute that you will want to shuffle the position in the selected attributes to put it in the same place in all region.
Hope this helps,
Candace -
Item Labels - tied to item or to layer?
I renamed all my custom control button graphics via Item Properties. The names showed up fine in the timeline (back, forward, pause, replay, exit). When I re-ordered two higher layers (play button and caption), all the labels shifted to different buttons. Turning off item/layer labelled "replay" now effects visibility of the exit button, etc.
It's as if shifting the layer order, shifted all the labels to new objects. Is this normal? Do the layers existing independently of the objects in the timeline, and if so, should I wait to relabel everything until the project is done?Hello,
No, this is not normal at all. Which version of Captivate do you use? And check the precise number please, perhaps there are updates?
I'm always labeling every object and slide, use those labels in advanced actions and never had that experience. I'm really curious to have more details.
Lilybiri -
Information about Item Instock FIFO layer
Dear Expert ,
We are maintaining the system in FIFO costing method.
And i want to re-valuate the Price through Template.
From where i get the information to put the data in the template of FIFO layer - MRV2
Thanks
Ashish RanjanHi Ashish,
Check below link to get the Open FIFO layers for item on Sales and purchase documents:
http://wiki.sdn.sap.com/wiki/display/B1/SAPB1D-SLSalesandPurchaseFIFOPriceforNon-BatchItems
http://wiki.sdn.sap.com/wiki/display/B1/SAPB1D-SLSalesandBuyFIFOPriceforBatchmanaged+Items
You can use this as base to create new query to get details if required.
Thanks,
Neetu
Maybe you are looking for
-
Adobe Photoshop 2014.2 Se ha producido un error al descargar esta actualización. Salga e inténtelo de nuevo más tarde. Código de error: U43M1D207 Actualización de SpeedGrade CC 2014.1 Se ha producido un error al descargar esta actualización. Salga e
-
Document flow says "Acct determin error". The invoice not posted in FI
Hello SAP gurus, Having an issue with my sales order (IJ1 single instance client 100 system) The document flow is saying "Acct determin error" and in the header status - billing document Invoice posting says "Not posted in FI". checked MM03 settings
-
Code to put URL address in iChat profiles so that they are clickable
as dumb as that sounds i cannot figure out how to do this. I used to use AIM with will do this automatically but i dont know how to work the iChat program taht will yet thanks, steve
-
How do you display TV programs in Box sets?
Is it possible to display TV programs and films as Box Sets? For example, in the library below, Friends and Futurama were purchased as a box set but Friends takes up 10 icons when it should only need 1 icon that expands out when double clicked. Ca
-
Note 4 - Calling waiting/conference call issues
Is this a defect in the new note? I am in able to end calls when answering a call (i.e. call waiting/conference calls). The other person can hang up but my phone will still say they are on hold. Which on turns holds up my free line. I find this rathe