Adobe Dreamweaver Forums



Last 10 THreads :         Creating a boundry in the stage... (Last Post : Rob Dillon - Replies : 1 - Views : 2 )           »          Re: Mouse capture won't activate (Last Post : robertnagle - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          How come the html is being displayed, and not the link (Last Post : Skaterstu - Replies : 0 - Views : 1 )           »          Another way to accomplish this (Last Post : Andy-K - Replies : 2 - Views : 3 )           »          HELP! Cannot upload files in DW CS4 (Last Post : dan@hoppernet.org - Replies : 6 - Views : 7 )           »          Adobe Flash 10 kills Wimpy (Last Post : m77ty8uu - Replies : 32 - Views : 208 )           »          How do I unlock all files in site at once (Last Post : Alan - Replies : 1 - Views : 2 )           »          Load library clip into target on stage (Last Post : NedWebs - Replies : 5 - Views : 8 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 10-09-2008, 04:14 PM
tiaan.wessels
 
Posts: n/a
Diggs:
Default Set bold has no effect

I have a page with a number of controls among other two TextAreas. I need to
programmatically set certain parts of text bold depending on user interaction
with some of the controls on the page. This however has no effect when I do it.
Using exactly the same code inside a selection change handler for the text area
where I set all the selected text bold works however which makes me think it
has something to do with the text area not having focus when I do it from the
place where its not working from. Setting focus to it first programmatically
however does not solve the problem either. Anyone able to provide some insight ?



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-09-2008, 04:33 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: Set bold has no effect

How are you doing this? There is a difference in MXML and in AS:

<mx:TextArea fontWeight="bold"/>

myTextArea.setStyle("fontWeight", "bold");
Reply With Quote
  #3 (permalink)  
Old 10-09-2008, 05:02 PM
tiaan.wessels
 
Posts: n/a
Diggs:
Default Re: Set bold has no effect

After I posted this it struck me to go in look what the RichText widget does in
flex/frameworks/projects/framework/src/mx/controls/ RichTextEditor.mxml and it
turns out the trick is the following lines:

dispatchEvent(new Event("change"));
invalidateDisplayList();
validateDisplayList();
callLater(setFocus);

immediately after tinkering with the textformat.



Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 02:16 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk