Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 15 total
Thread 'Invisible' data-enabled TLabel in design mode
Tue, May 10 2016 4:50 PMPermanent Link

Trinione

For purposes of design and any movement of the TLabel component, at design-time I may, for example, place a marker of '..' in the Caption.

However, upon assigning a DataSet and DataColumn value to a TLabel component AND Saving and Reopening the form - the Caption value is no longer visible. The label is on the form, but the Caption value is no longer there so the label is effectively invisible at design-time. :/

Can the '..' be made to remain visible on data-enabled TLabel components? Being able to see the component is preferred.
Wed, May 11 2016 7:40 AMPermanent Link

Matthew Jones

Trinione wrote:

> Can the '..' be made to remain visible on data-enabled TLabel
> components? Being able to see the component is preferred.

Presumably any text would be better than nothing? So at design time it
could be the data column name or something? That might be a more
sensible "disconnected" alternative.

--

Matthew Jones
Wed, May 11 2016 11:30 AMPermanent Link

Trinione

<< So at design time it could be the data column name or something? That might be a more sensible "disconnected" alternative. >>

No difference. The issue is after Saving - Closing - Reopening the form the data the Caption is empty.
Wed, May 11 2016 11:54 AMPermanent Link

Matthew Jones

Trinione wrote:

> << So at design time it could be the data column name or something?
> That might be a more sensible "disconnected" alternative. >>
>
> No difference. The issue is after Saving - Closing - Reopening the
> form the data the Caption is empty.

I'm suggesting what Tim might change it to - the column name would seem
to be more generally useful.

--

Matthew Jones
Wed, May 11 2016 4:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Can the '..' be made to remain visible on data-enabled TLabel components? Being able to see the component is preferred. >>

That's a huge amount of work, and would confuse the heck out of everyone, so I'm going to have to say "no".

Tim Young
Elevate Software
www.elevatesoft.com
Thu, May 12 2016 12:51 PMPermanent Link

Trinione

<< That's a huge amount of work, and would confuse the heck out of everyone, so I'm going to have to say "no". >>

Tim:
As it stands, at initial design the TLabel is visible. It is upon reopening the form that it loses the Caption value on the data enabled field.

Can you suggest an approach to 'see' the field? Right now it's just an empty 'invisible' space that cannot be clicked on. Frown

Not a priority right now with 2.05 about to hit, but something to note.
Thu, May 12 2016 1:13 PMPermanent Link

Raul

Team Elevate Team Elevate

On 5/12/2016 12:51 PM, Trinione wrote:
> Can you suggest an approach to 'see' the field? Right now it's just an empty 'invisible' space that cannot be clicked on. Frown

The reason you cannot click on it is likely because you have the
"AutoSize" set to true so without content it autosizes itself down to 0
width. It is still selectable using Object Inspector but of course then
naming weould become important (finding which  LabelX it is can be tricky).

Setting AutoSize false would leave it in exact place and size so its
clickable still.

Raul
Thu, May 12 2016 3:40 PMPermanent Link

Trinione

<< The reason you cannot click on it is likely because you have the  "AutoSize" set to true so without content it autosizes itself down to 0  width. It is still selectable using Object Inspector but of course then  naming weould become important (finding which  LabelX it is can be tricky).

Setting AutoSize false would leave it in exact place and size so its clickable still. >>

Raul:
Nope. Same issue. Upon saving, closing and reopening its blank. However, one benefit of setting the AutoSize to false is that upon hitting Ctrl+Mouse drag over the 'empty' area, the component selector appears. So, that makes it a wee bit easier. But, still an effort.

Yes, naming the components is absolutely necessary, and finding them in a list of dozens is time consuming versus a click and work with.
Thu, May 12 2016 9:09 PMPermanent Link

Raul

Team Elevate Team Elevate

On 5/12/2016 3:40 PM, Trinione wrote:
> Nope. Same issue. Upon saving, closing and reopening its blank. However, one benefit of setting the AutoSize to false is that upon hitting Ctrl+Mouse drag over the 'empty' area, the component selector appears. So, that makes it a wee bit easier. But, still an effort.

I was just commenting on the inability to click on it - it's still blank
of course but with autosize false it is clickable.

I was trying to look TLabel source code to see what one needs to do to
achieve what i think you're asking for.

My original ideas was to do something as follows (rough logic) :

{$IFDEF DESIGN}
  if DataBound then
   result := '...' //design time default to "..." so its visible
  else
   result := Caption; //use whatever normal logic was
  {$ELSE}
   Result:=Caption; //runtime always use normal caption logic
  {$ENDIF}


But could not make it work - need to investigate more when have more time.

Raul
Tue, May 17 2016 10:51 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< However, upon assigning a DataSet and DataColumn value to a TLabel component AND Saving and Reopening the form - the Caption value is no longer visible. The label is on the form, but the Caption value is no longer there so the label is effectively invisible at design-time. :/ >>

I had to re-read this again, because you're still commenting and I wanted to make sure that I read this correctly. I now know what you're saying, tested it out, and here's the hot fix (actual fix in 2.05):

WebCtrls unit:

procedure TBindableColumnControl.DataChanged;
begin
  if DataBound then
     DoSetText(Column.Text)
  else
     DoSetText(DoGetText);  <<< Change this line !!!!
end;

Tim Young
Elevate Software
www.elevatesoft.com
Page 1 of 2Next Page »
Jump to Page:  1 2
Image