Tree control or multicolum​n listbox vertical alignment
Hello, here is my problem: i use a tree and i need to resize it programmatically, so i change the height of all cells. When i resize it, there is no more vertical alignment between names(text) and tree's branchs.
This problem even occurs with multicolumn listbox: when i resize cells, the text is no more vertical centered....
Thanks a lot for any help
Attachments:
TreeVerticalAlignment.vi 15 KB
So, now it's 2011. It seems like this issue has not been addressed yet. Any good work arounds? I'm trying to have larger rows without extraordinarily large text. I am using multiple lines to get the desired effect; however, the item symbols are vertically aligned to the top, so they don't look good.
Thanks,
Chris
Similar Messages
-
Tree control bug for vertical scrollbar
Dear all:
I meet a problem with tree control vertical scrollbar.Pls check the picture
If set the rows of the properties of the Tree control is a number, also set the vertical scroll bar is visible.
Then if i set the height of Tree is unchangeable, then set the Tree childs rows are much more than the height, The problem is that the vertical scroll bar doesn't work. The height is increase than what i have set ,Maybe it is a bug? or not.
Anybody find this?
Attachments:
Image000011.jpg 66 KBHello,
I works fine with me.
But I added my test as attachment, so you can see if you maybe doing something else.
Kind regards,
André
Regards,
André
Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
Attachments:
Tree control bug question.vi 20 KB -
How to design a listbox or tree control related to the database
Now i have a problem to design a listbox or tree control, it is designed to connect to the database, if the related element in database changed, the element in listbox or tree control should also change. i have managed to read the element in database, but i cannot input it to the listbox or tree control, since it has no input terminal that i can only use the Labeling tool and enter text into it.
is there any advise on it, maybe i can use another control rather than listbox or tree control. any suggestion would be appreciate.
Thank you
XuYHi Xuy,
On the front-panel, right-click on the text-ring control and select: Create\Property Node.
Then, on the diagram, right-click on the property-node and select "Strings[]".
The "strings[]" property is the array of strings available in the control - and you can change it.
Cheers!
Message Edited by tbd on 04-05-2007 11:18 PM
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Attachments:
RingStrings.jpg 6 KB -
How can I display and change built-in symbols of a tree control programmatically?
I want to set the built-in symbols of a tree control during runtime.
I only found an example to assign custom pictures but not how to select one of the 40 built-in symbol.
Many Thanks
Solved!
Go to Solution.The ActiveItem.SymbolIndex will allow you to select the symbol for the active item. You can use the ListBox Symbol Ring Constant (Dialog and User Interface palette) to select a symbol (or you can just enter the number directly if you know what it is).
Message Edited by smercurio_fc on 07-10-2008 09:36 AM
Attachments:
Example_VI_BD6.png 2 KB -
Label display issue in Tree component when it is having vertical scrollbar
I am using tree component as dropdown factory for combo box. When i open dropdown, it doesn't have vertical scrollbar and all the root nodes are getting displayed correctly(in closed mode). Now if i try to open any node, i am getting vertical scrollbar as the child nodes are more. Now the problem is if scroll down, some of the nodes(labels) are not getting displayed but i am able to see the icon. If i keep on scrolling bottom to top and top to bottom, some of the nodes are showing labels and some are not(It is inconsistant).
I have not used any custom item renderer for tree control. I used my custom dataDescriptor which i have implemented from ITreeDataDescriptor. Also I tried extending DefalutDataDescriptor, but no luck.Does it work if the tree is not in a combobox?
-
How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?
You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
Attachments:
Drag&Drop.llb 65 KBHi Jones,
As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
Good luck!
Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions -
Add multiple elements to a tree control at once
I am using a Tree Control to display customer and certificate information. However, adding 500 customer names or certificate numbers to the tree control one at a time takes for ever (well, 30000 ms). Is there any way to add multiple elements to a tree all at once, or is the only solution to use a listbox with 'forward' and 'back' buttons ?
thanks,
michaelHi Michael
I don’t believe there is a way to supply a list of child items to a parent item, they have to be added incrementally. One way that you could speed this process up is to design your code such that only when you expand an item does it add the child items.
If you want an even higher update rate have a look at using the ActiveX TreeView control, you will find an example called Family Tree.vi in the LV examples.
I'll do up some code that makes using both of the controls more efficient if enough people want it.
Kurt Friday
www.sciware.com.au -
Vertical Alignment in table columns
Using JHeadstart 10.1.3.4.
Different display types are differently positioned in table columns. Single text seems vertically centered; text fields with multiple lines are vertically aligned at the top of a table column; vertical radio buttons are vertically aligned at the bottom of a table column. The resulting display is quite messy.
I have not found any formating option in JHeadStart that allows for controlling vertical alignment. Am I a missing something?
If JHeadStart 10g does not support controlling vertical alignment directly, how should this be handled? Does JHeadStart 11g add such vertical alignment support?Hello,
If you need anything special considering vertical alignment in tables, you can simply perform that in the resulting JSPX page. In other words, just alter the JSPX file to whatever you need.
Save your customizations in JHeadstart using velocity templates, so your page is regenerateable while keeping your changes. See the JHeadstart Developers Guide on how to change such customizations in the templates.
Also in release 11 there is no vertical alignment (yet); I suppose because for most tables, each row just has a single line and vertical alignment is therefore not needed. However, I have put it on the wish-list, so we will check on it later. Thanks!
Regards,
Evert-Jan de Bruin
JHeadstart Team -
Populate flex tree control on demand using HTTPService (Flex 3)
First, I am sorry if the same post is already posted here but after spending 30 minutes or may be more I could not find the solution.
By the way I have two problems. 1.) I am new to flex which I know if my own problem and soon I will handle it.
2.) This is major problem for me. I have to populate Tree control from database and I used HTTPService to get the data from database.
I created a object of HTTPService and on load of Tree control I am calling a function which calls the HTTP URL and returns me the first level of node for my Tree.
When I click on any node a function is called again using HTTPService and result is appended to the currently selected node. The same goes until n level and it works fine. I was happy with my results. I am stuck in new problem. The problem is if the tree is already populated on my browser and I make some add/update/delete any node or child node, the flex doesn't make a call to HTTP URL and I am not getting updated data.
The mxml code is below (this code has some extra things too).
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#000000, #868686]" >
<mx:Script>
<![CDATA[
import mx.utils.StringUtil;
import mx.rpc.http.HTTPService;
import mx.events.ListEvent;
import mx.binding.utils.BindingUtils;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.collections.XMLListCollection;
import mx.utils.ObjectProxy;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.utils.ArrayUtil;
[Bindable]
public var datalist:XMLListCollection = new XMLListCollection();
[Bindable]
public var xmlFromDatabase:HTTPService=new HTTPService();
[Bindable]
private var xmlForChildren:HTTPService;
private function resultHandler( event:ResultEvent ):void
var x:XML = event.result as XML;
var xl:XMLList = XMLList( x );
private function faultHandler( event:FaultEvent ):void
Alert.show(event.message.toString());
private function display():void
var params:Object = {};
params["parent"] = "0";
xmlFromDatabase.url = "http://localhost:8080/GrailsFlex/department/tree";
xmlFromDatabase.method = "GET";
xmlFromDatabase.resultFormat = "e4x";
xmlFromDatabase.useProxy = false;
xmlFromDatabase.send(params);
xmlFromDatabase.addEventListener(ResultEvent.RESULT,displyTree,false,0,false);
private function displyTree(event:ResultEvent):void
XMLtree1.dataProvider = event.result;
XMLtree1.labelField = "@name";
private function getChilds(event:ListEvent):void
try
var xmlTree:Tree = event.currentTarget as Tree;
var node:XML = xmlTree.selectedItem as XML
var params:Object = {};
params["parent"] = node.@id;
xmlForChildren = new HTTPService();
xmlForChildren.url = "http://localhost:8080/GrailsFlex/department/tree";
xmlForChildren.method = "GET";
xmlForChildren.resultFormat = "e4x";
xmlForChildren.useProxy = false;
xmlForChildren.send(params);
xmlForChildren.addEventListener(ResultEvent.RESULT,appendChild,false,0,false);
xmlForChildren.addEventListener(ListEvent.ITEM_CLICK,getChilds,false,0,false);
catch (E:Error)
Alert.show("getChilds Error:-- " + E.message);
private function deleteTreeNode(xmlItem:XML):void
var xmlParent:XML = XML(xmlItem).parent();
if (xmlParent.@parent == null || StringUtil.trim(xmlParent.@parent) == "")
xmlParent.@parent = "0";
if (xmlParent.@parent != "0")
//Recursive call until I get reach to children of root node
deleteTreeNode(xmlParent);
else
// Now I am at root.
var xmlRoot:XML = XML(xmlParent).parent();
var bActualRoot:Boolean = false;
if (xmlRoot == null)
xmlRoot = xmlParent;
bActualRoot = true;
if (bActualRoot)
if (xmlRoot.@parent == "0")
try
for each (var xl:XML in xmlParent.children())
if (xl.@name != xmlItem.@name)
for (var cn:int=xl.children().length()-1; cn >=0; cn--)
delete xl.children()[cn];
catch (ex:Error)
Alert.show("error Real Root: " + ex.toString());
else
for each (var nodexm:XML in xmlRoot.children() )
if (nodexm.@name != xmlParent.@name )
try
for (var cu:int=nodexm.children().length()-1; cu >=0; cu--)
delete nodexm.children()[cu];
catch (ex:Error)
Alert.show("error No Real Root: " + ex.toString());
private function appendChild(event:ResultEvent):void
var node:XML = event.result as XML
var sItem: XML = XMLtree1.selectedItem as XML;
if (sItem.children().length() > 0)
delete sItem.children();
for(var i:int=0; i < node.children().length(); i++)
var item:XML = node.children()[i];
XMLtree1.selectedItem.appendChild(item);
XMLtree1.expandItem(XMLtree1.selectedItem,true,true);
deleteTreeNode(XML(XMLtree1.selectedItem));
]]>
</mx:Script>
<mx:Tree id="XMLtree1" width="350" height="470"
showRoot="false" creationComplete="display()" itemClick="getChilds(event)" />
</mx:Application>
Thanks in advanceThanks buddy for the answer.
Unfortunately the answer came after quite long time of posting the message. Anyway I was able to open a tree on demand using HttpService and due to my new requirement I changed it to RemoteObject.
I my latest change I am able to populate tree nodes on demand and also the same solution if getting update from server via JMS using Consumer object.
I kind a like this solution because it took me good amount of effort to find the right solution.
If any one is intersted the he/she can reply to the post and I can provide code here or may at some location so that it can be easily downloaded.
The solution is Flex-Grails combination.
Thanks everybody. -
Numeric cell in Tree control ?
Hi y'all !
I'd like to have numeric input cells in my TREE CONTROL. I can see the types string, ring, combo box, etc. ... but NUMERIC is not included.
I'm using CVI 2012.
Is there an alternative or does anyone know at least why it is not supported ?
Thanks!Hi carolynturnell,
Indeed cell types included in a tree control are String,Ring, ComboBox, CheckBox, ColorPicker and HorizontalBar.
Tree controls are used to view a hierarchical list of items.
Why do you want to display Numeric/use tree control ?
Valentin
Certified TestStand Architect
Certified LabVIEW Developer
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
Travaux Pratiques d'initiation à LabVIEW et à la mesure
Du 2 au 23 octobre, partout en France -
Losing table vertical alignment when converting ditamap to book
FrameMaker Version: 12.0.4.445 (latest, part of TCS5)
I have a structured project, where several XML files have been arranged into a ditamap.
For one of the XML files, I have a table, where I need to set Cell Vertical Alignment of the cells to MIDDLE.
So using Paragraph Designer > Table Cell, I change the entries from Top to Middle (The defaults were Top).
With the ditamap pane selected, I then go File menu >> Save Ditamap As
I save the ditamap as "Book 12.0 with fm components (*.book)" file type.
In the resulting book, the XML files are now .FM files.
However, at this point, when I open the .FM file that has the table, the cell styles have reverted to TOP.
I've searched high-and-low for a similar issue. This is looking like a bug to me, but can someone confirm?
Thanks(Perhaps the moderator should move this to the FrameMaker Integration discussion (under RoboHelp).
I've determined the correct settings for my purposes, that being vertical alignment in a FM-to-RH integration project. I originally thought it was specifically a FrameMaker issue, though the solution also involves settings in RoboHelp. Here are my findings:
1. For the selected FM table, note its Table Tag in the Table Designer (e.g., FormatA). This will be used later.
2. If there is table Entry > Image element, then select the Image element, and set its placement attribute = inline.
Though inline is supposed to be the default, I found it necessary to state explicitly in order to control alignment of image within a RH table cell.
3. Moving on from FM, in the CSS file that you are using with your RH project, suppose that you have defined your table as follows. Note that I'm using "CenterMiddle" as the title.
table.CenterMiddle {
width: 100% ! important ; /* This forces the RH table to autofit the window */
text-align: Center;
font-family: "Adobe Garamond Pro";
border-left-style: Solid;
border-left-width: 1px;
border-left-color: #000000;
border-right-style: Solid;
border-right-width: 1px;
border-right-color: #000000;
border-top-style: Solid;
border-top-width: 1px;
border-top-color: #000000;
border-bottom-style: Solid;
border-bottom-width: 1px;
border-bottom-color: #000000;
.CenterMiddle td {
vertical-align: middle ! important ; /* This forces the individual cells to align vertically */
border-color: #000000;
border-style: solid;
border-width: 1px;
4. Go to the RH project to which the FM project is linked.
5. Go File menu > Project Settings.
6. In the FrameMaker Document group, click Edit.
7. Under FrameMaker Settings, locate the Table style that you noted in step (1), and set it to the name of your table from (3).
At this point, you can update all the FM components in your RH project, and compile the RH project to get the desired results. In my case, I needed both text and images in the table cells to have vertical alignment = middle. -
Change the selection of tree control with a right click
How is it possible to change the item selected in a tree control (LabVIEW7) with a mouse right click ?
Filippo,
Here is a popup menu toolkit, with an additional example for a listbox. If I
understand your problem, it shouldn't be hard to change it to a tree
control.
Regards,
Wiebe.
"Filippo" wrote in message
news:[email protected]..
> Sorry for my english ! If you can send me an example, it could be very
> useful for me.
> My e-mail is : [email protected]
> Thanks.
> Regards,
>
> Filippo
[Attachment Menu 042004.zip, see below]
Attachments:
Menu_042004.zip 175 KB -
DateField value doesn't vertically align
I am trying to use an mx DateField component, however, it appears that the selected date value isn't vertically aligned by default (within the label field of the DateField component) upon selection.
There isn't a properly for 'verticalAlign' for this component.... how can I properly align within the DateField's label?
Here is the code.... am I missing initial settings to get the alignment that I am looking for?
<s:HGroup id="endGroup" width="100%">
<mx:DateField id="endDate" width="100" change="validate(event)"/>
</s:HGroup>
Thanks,
Muad'Dibwow!.... you're right. I just assumed it was the default behavior of the control. I copied and pasted my code into a new project and everything looks great. So something a layer up is affecting my layout (I am one of many flex applications running on a particular service)... I will start looking in that direction!
thanks,
Muad'Dib -
What does vertical-align in CSS do?
Hi
I thought it meant that any text in the DIV would be, for
example, lined up down the bottom of the DIV if the vertical-align
was set to baseline. But that doesn't seem to be the case. So what
does vertical-align control in CSS?
Cheers
Shauncelebritymusic wrote:
> Hi
>
> I thought it meant that any text in the DIV would be,
for example,
> lined up down the bottom of the DIV if the
vertical-align was set to
> baseline. But that doesn't seem to be the case. So what
does
> vertical-align control in CSS?
http://www.w3.org/TR/REC-CSS1#vertical-align
Thierry
Articles and Tutorials:
http://www.TJKDesign.com/go/?0
The perfect FAQ page:
http://www.TJKDesign.com/go/?9
CSS-P Templates:
http://www.TJKDesign.com/go/?1
CSS Tab Menu:
http://www.TJKDesign.com/go/?3 -
Hi everybody,
I am getting a display problem with tree control. The tree
control has a fixed height and width, and has quite a few nodes
with different level of branches. When i have the tree fully
expanded, then I am getting both horizontal and vertical scrolls.
If I scroll down using vertical scrollbar and scroll right using
horizontal scrollbar, I am able to see the tree node labels
properly. But after that if I scroll up then the nodes that had got
hidden due to the previous down scroll appear cut off.. the label
is half way erased.Hi everybody,
I am getting a display problem with tree control. The tree
control has a fixed height and width, and has quite a few nodes
with different level of branches. When i have the tree fully
expanded, then I am getting both horizontal and vertical scrolls.
If I scroll down using vertical scrollbar and scroll right using
horizontal scrollbar, I am able to see the tree node labels
properly. But after that if I scroll up then the nodes that had got
hidden due to the previous down scroll appear cut off.. the label
is half way erased.
Maybe you are looking for
-
How do I do a clean install of Snow Leopard on a mid 2010 13" MacBook Pro
Hello All, I am replacing a dead hard drive without any backups (I'm fixing someone else's computer), so I want to do a clean install. When I boot the retail Snow Leopard DVD, I get a kernel panic. Is this the wrong DVD? I don't have the original
-
Medical records. How to protect your old hard drive or how to destroy it.
How do you get a new iMac with AppleCare so that you don't have to return the old hard drive if the hard drive ever needs to be replaced?... so that you can protect or destroy the old hard drive yourself in accord with HIPAA Health Information and Pr
-
Problem in Continuous check printing from second page in F-58
Hi , I am using T code F-58 to trigger cheques. I have made a Z* of the standard script F110_PRENUM_CHCK as I just require the Payee name, date, amount in digits and amount in words to be printed on the cheque.I am using the continuous stationary for
-
I am getting an invalid serial number error for Adobe Acrobat XI
Hi - My principal has ordered a copy of Adobe Acrobat XI for a school computer. The disc came with a serial number for a Mac installation, which he is hoping to install on his macbook air. I am using Remote Disc to install it. However, the serial num
-
download applications with payment, I downloaded normally, and now I can not download nor Freeware seems that I have not pay. How can I solve this problem, thank you