XOJO 2020 WEB - HTMLArea not available - replacements?

In 2019 I had a great way to style text into an HTMLArea in a WEB project. I am upgrading to Web 2.0 and see that my Custom Web Control can no longer use HTMLArea as a Super as that is not available.

Anyone know of there is there a substitute for HTMLArea?

Just use HTMLViewer and load raw html into it.

@Greg_O_Lone - thanks - found it. Now onto figuring out how to address XOJO 2019 to XOJO 2020 Web Styles

Different beast. I wrote a few articles which might help you a bit. There might be a Web Style Editor in Web 2 one day, but currently you have only 5 options.

  1. adapt a bootstrap theme
  2. the style element and adjust properties there
  3. own CSS in the HTML header
  4. plugins/tools like graffitsuite.com or your own
  5. injecting own Javascript (but you need to know what you are doing w/o breaking the Xojo framework)

It is different, but already today you can achieve a lot! But yes, it is different to old webstyle approach, which many liked. I didn’t, I found it cumbersome and annoying maintaining complex webstyles in the IDE, but I understand that it was easier than doing by your own.

Privately talking (I’m not affiliated to xojo): I’m limiting my customizations I’m using to an absolute minimum, as I’m quite sure that xojo will have more features in the next releases.





BTW congratulations @Anthony_G_Cyphers, I played a bit around with your latest release. Big progress!, especially in regards of speed!

On a side note: is it possible to exclude GS from the project analysis via some #pragmas?, so excluding solely GS from those tests?

Not that I’m aware of. I’ll be tackling analysis warnings soon(ish). It’s just not been a priority.

As to the topic, GraffitiLabel for Web Edition 2.0 might be worth a look.

1 Like

Same here, but I achieved it finally, 2 warnings left, but they are from the IDE and I have open FCs for them. So guess what is getting on my nerves now :slight_smile: - good to see, that you have it in your scope!. To bring this back to the topic, +1 for GraffitiLabel, but overall all the Web Edition 2.0 stuff. Looking forward to playing around with it in the next days!

1 Like

@Jeannot_Muller - Yes I see that Style is a whole new style of a solution in Web 2.0. I have many ‘Styles’ in Web 1.0 and while cumbersome from the aspect of the overall number I created it was quick and fast to create and use in the IDE where you wanted it. Now well its a HUGE hole that further delays using Web 2.0 in real world for our needs.

@Anthony_G_Cyphers - nice progress on Web 2.0. When you have an opportunity let me know when Grid Contextual Menus will be ready and table/grid/cell formatting. For Contextual Menus I also need to find a solution to track the mouse as that is NOT available as a Event Handler in a WebContainer in XOJO 2020

Heres a sample of what I use in Web 1.0 that now fail.

Phone_Info_GWG_LB.StyleRowEven = GridRowEven
Phone_Info_GWG_LB.StyleRowOdd = GridRowOdd
Phone_Info_GWG_LB.StyleRowSelected = GridRowSelected
Phone_Info_GWG_LB.StyleCellBorder = GridCellBorder
Phone_Info_GWG_LB.SelectionType = GraffitiGrid.SelectionTypes.Cell
Phone_Info_GWG_LB.Style = Left_Aligned_10pt

'— Graffiti Contextual Menu
Dim VMEMAIL As New GraffitiContextualMenuItem( “cs-VM” )
VMEMAIL.Children.Append( new GraffitiContextualMenuItem( “No”, “No”, “novm” ) )
VMEMAIL.Children.Append( new GraffitiContextualMenuItem( “VM Only”, “VM Only”, “vmonly” ) )
VMEMAIL.Children.Append( new GraffitiContextualMenuItem( “VM & Email”, “VM & Email”, “vmemail” ) )
'— Enable the below when MB will be enabled
'VMEMAIL.Children.Append( new GraffitiMenuItem( “MB”, “MB”, “mb” ) )

gwcmSCG.AddMenu( VMEMAIL, VMEMAIL, True )

Beyond all that I wish you, your family and anyone reading this a healthy, safe and happy holiday season


1 Like

GraffitiStyle, and assigning them to GraffitiGrid for Web 2.0, is done but currently undocumented:

var gridRowEven as GraffitiStyle = GraffitiStyle.Create( Session, "gridRowEven", "background:rgba(0, 0, 0, 0.2);color:#00f" )
me.StyleRowEven = gridRowEven

GraffitiWebContextMenu is now GraffitiMenu. GraffitiGrid’s events pass X and Y parameters for mouse-related actions.

In the Open event of my Grid, with an instance of GraffitiMenu on the page, I have this code:

var EditMenuItem as new GraffitiMenuItem( "EditMenu" )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "text", "Plain Text" ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "undo", "Undo", "fa fa-undo", false, "u" ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( True ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "cut", "Cut", "fa fa-cut", false, "t" ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "copy", "Copy", "fa fa-copy", false, "c" ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "paste", "Paste", "fa fa-paste", True, "p" ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "delete", "Delete", "fa fa-times", false, "d" ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( True ) )
EditMenuItem.Children.AddRow( new GraffitiMenuItem( "selall", "Select All", "fa fa-i-cursor", false, "s" ) )
GraffitiMenu1.AddMenu( EditMenuItem )

Then, in the ContextClick event of my GraffitiGrid for Web 2.0 instance, I have this:

var unattachedMenu as GraffitiMenuItem = GraffitiMenu1.MenuByName( "EditMenu" )
GraffitiMenu1.ShowMenu( unattachedMenu, X, Y )

From there, you just need store the Row and Column in ContextClick, then handle selection in the MenuAction event of the GraffitiMenu instance.

UPDATE: GraffitiStyle is now documented.


Yes, I agree. That’s why I’m either not migrating my Web 1.0 apps at all, or I’m redesigning them: means changing the UI significantly, and only reuse the underlying code where possible. But of course we all have different “needs”. I fully understand that someone who used Web 1.0 for instance for a pixel accurate POI or POS system will not benefit from Web 2.0 as a main feature of Web 1 as evaporated.

However, I see many benefits too: performance increase, modern look & feel and a promising foundation for more to come. BTW @Tim_Parnell developed a Kit to mimic some missing events from Web 1.

Finally after more than a month of on and off again conversion I have been able to compile and run the WE app. All I can say is wow what a mess.

In Web 1.0 I was able to create a desktop like app that we use for Cisco UC UCM and CUC efforts. This replaced two 11Mb and 12Mb Excel VBA workbooks. The solution was not as fast as I wanted it to be but some of that I do believe is my lack of web knowldge. I am what I refer to as a bit twiddler. I work in telecom, network, DBs, and micro controller integrations.

I have more code conversions to perform in order to get proper user interaction functioning. Some Containers dimensions were altered. All Input Fields, PopUps etc… need updating of appearance. Need to work on a CSV download feature I developed using GraffitSuite Web solutions as well. WebToolBar needs work - Oyyeee

With no WebStyles available I now see the work needed to get the nice user looking interface fixed. I do recognize that with the implementation of CSS capabilities this should significantly improve capabilities from color to animation. So it appears my days of escaping the need to learn CSS may be over. Something else to cram into the cranium.

In the interim I will address code changes for functionality and observe progress made on Styles. For the near term I will check out the links @Jeannot_Muller provided and GraffitiStyles and other features from @Anthony_G_Cyphers

2021 is looking like it may be a full one already. Happy New Year :clinking_glasses: :tada: